├── .gitignore ├── .npmignore ├── ShmdbObject.cc ├── ShmdbObject.h ├── addon.cc ├── binding.gyp ├── build.bat ├── changelog.md ├── extenal └── shmdb │ ├── .gitignore │ ├── AUTHORS │ ├── ChangeLog │ ├── INSTALL │ ├── LICENSE │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── NEWS │ ├── README │ ├── autogen.sh │ ├── configure │ ├── configure.ac │ ├── include │ ├── errcode.h │ ├── hash.h │ ├── log.h │ ├── mm.h │ ├── platform.h │ ├── prime.h │ └── transform.h │ ├── readm-en.md │ ├── readme-zh.md │ ├── shmdb.sln │ ├── src │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── hash.c │ ├── log.c │ ├── mm.c │ ├── prime.c │ ├── src.vcxproj │ ├── src.vcxproj.filters │ └── transform.c │ ├── test │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ └── main_test.c │ ├── win32_test │ ├── test_main.cpp │ ├── win32_test.vcxproj │ └── win32_test.vcxproj.filters │ └── win32_test_sub │ ├── main_test_sub.cpp │ ├── win32_test_sub.vcxproj │ └── win32_test_sub.vcxproj.filters ├── index.js ├── package.json ├── readme-cn.md ├── readme.md └── test ├── mutilple_test.bat ├── single_test.bat ├── test_mutilple_process.js └── test_single_process.js /.gitignore: -------------------------------------------------------------------------------- 1 | /bak 2 | 3 | /build 4 | /*.log 5 | /node_modules 6 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | readme-cn.md -------------------------------------------------------------------------------- /ShmdbObject.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yunnysunny/node-shmdb/ab024f49b1ecbd59c20d49770523a532773bdbdd/ShmdbObject.cc -------------------------------------------------------------------------------- /ShmdbObject.h: -------------------------------------------------------------------------------- 1 | #ifndef MYOBJECT_H 2 | #define MYOBJECT_H 3 | 4 | #include 5 | #include "platform.h" 6 | #if __IS_WIN__ 7 | //#include 8 | #else 9 | #endif 10 | extern "C" { 11 | #include "mm.h" 12 | } 13 | 14 | #define ERROR_NOT_INIT 0xe0000001 15 | #define ERROR_PRARAM_ERROR 0xe0000002 16 | 17 | class ShmdbObject : public node::ObjectWrap { 18 | public: 19 | static void Init(v8::Handle module); 20 | 21 | private: 22 | ShmdbObject(); 23 | ~ShmdbObject(); 24 | 25 | // static char *getBuffer(v8::Local); 26 | static NAN_METHOD(New); 27 | static NAN_METHOD(put); 28 | static NAN_METHOD(get); 29 | static NAN_METHOD(remove); 30 | static NAN_METHOD(dump); 31 | static NAN_METHOD(destroy); 32 | static Nan::Persistent constructor; 33 | 34 | unsigned int _length; 35 | STHashShareHandle _handle; 36 | bool _isParent; 37 | bool hasInit; 38 | }; 39 | 40 | #endif -------------------------------------------------------------------------------- /addon.cc: -------------------------------------------------------------------------------- 1 | #define BUILDING_NODE_EXTENSION 2 | #include 3 | #include "ShmdbObject.h" 4 | 5 | using namespace v8; 6 | 7 | void InitAll(Handle exports, Handle module) { 8 | ShmdbObject::Init(module); 9 | } 10 | 11 | NODE_MODULE(shmdb, InitAll) -------------------------------------------------------------------------------- /binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | "targets" : [ 3 | { 4 | "target_name" : "shmdb", 5 | "include_dirs" : [ 6 | " -------------------------------------------------------------------------------- /extenal/shmdb/ChangeLog: -------------------------------------------------------------------------------- 1 | v0.2 20140913 2 | 1.add the support of windows. 3 | 2.fix the issue of calculating the string's hash index. 4 | v0.1 5 | Use automake to create binaray. -------------------------------------------------------------------------------- /extenal/shmdb/INSTALL: -------------------------------------------------------------------------------- 1 | Installation Instructions 2 | ************************* 3 | 4 | Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, 5 | Inc. 6 | 7 | Copying and distribution of this file, with or without modification, 8 | are permitted in any medium without royalty provided the copyright 9 | notice and this notice are preserved. This file is offered as-is, 10 | without warranty of any kind. 11 | 12 | Basic Installation 13 | ================== 14 | 15 | Briefly, the shell command `./configure && make && make install' 16 | should configure, build, and install this package. The following 17 | more-detailed instructions are generic; see the `README' file for 18 | instructions specific to this package. Some packages provide this 19 | `INSTALL' file but do not implement all of the features documented 20 | below. The lack of an optional feature in a given package is not 21 | necessarily a bug. More recommendations for GNU packages can be found 22 | in *note Makefile Conventions: (standards)Makefile Conventions. 23 | 24 | The `configure' shell script attempts to guess correct values for 25 | various system-dependent variables used during compilation. It uses 26 | those values to create a `Makefile' in each directory of the package. 27 | It may also create one or more `.h' files containing system-dependent 28 | definitions. Finally, it creates a shell script `config.status' that 29 | you can run in the future to recreate the current configuration, and a 30 | file `config.log' containing compiler output (useful mainly for 31 | debugging `configure'). 32 | 33 | It can also use an optional file (typically called `config.cache' 34 | and enabled with `--cache-file=config.cache' or simply `-C') that saves 35 | the results of its tests to speed up reconfiguring. Caching is 36 | disabled by default to prevent problems with accidental use of stale 37 | cache files. 38 | 39 | If you need to do unusual things to compile the package, please try 40 | to figure out how `configure' could check whether to do them, and mail 41 | diffs or instructions to the address given in the `README' so they can 42 | be considered for the next release. If you are using the cache, and at 43 | some point `config.cache' contains results you don't want to keep, you 44 | may remove or edit it. 45 | 46 | The file `configure.ac' (or `configure.in') is used to create 47 | `configure' by a program called `autoconf'. You need `configure.ac' if 48 | you want to change it or regenerate `configure' using a newer version 49 | of `autoconf'. 50 | 51 | The simplest way to compile this package is: 52 | 53 | 1. `cd' to the directory containing the package's source code and type 54 | `./configure' to configure the package for your system. 55 | 56 | Running `configure' might take a while. While running, it prints 57 | some messages telling which features it is checking for. 58 | 59 | 2. Type `make' to compile the package. 60 | 61 | 3. Optionally, type `make check' to run any self-tests that come with 62 | the package, generally using the just-built uninstalled binaries. 63 | 64 | 4. Type `make install' to install the programs and any data files and 65 | documentation. When installing into a prefix owned by root, it is 66 | recommended that the package be configured and built as a regular 67 | user, and only the `make install' phase executed with root 68 | privileges. 69 | 70 | 5. Optionally, type `make installcheck' to repeat any self-tests, but 71 | this time using the binaries in their final installed location. 72 | This target does not install anything. Running this target as a 73 | regular user, particularly if the prior `make install' required 74 | root privileges, verifies that the installation completed 75 | correctly. 76 | 77 | 6. You can remove the program binaries and object files from the 78 | source code directory by typing `make clean'. To also remove the 79 | files that `configure' created (so you can compile the package for 80 | a different kind of computer), type `make distclean'. There is 81 | also a `make maintainer-clean' target, but that is intended mainly 82 | for the package's developers. If you use it, you may have to get 83 | all sorts of other programs in order to regenerate files that came 84 | with the distribution. 85 | 86 | 7. Often, you can also type `make uninstall' to remove the installed 87 | files again. In practice, not all packages have tested that 88 | uninstallation works correctly, even though it is required by the 89 | GNU Coding Standards. 90 | 91 | 8. Some packages, particularly those that use Automake, provide `make 92 | distcheck', which can by used by developers to test that all other 93 | targets like `make install' and `make uninstall' work correctly. 94 | This target is generally not run by end users. 95 | 96 | Compilers and Options 97 | ===================== 98 | 99 | Some systems require unusual options for compilation or linking that 100 | the `configure' script does not know about. Run `./configure --help' 101 | for details on some of the pertinent environment variables. 102 | 103 | You can give `configure' initial values for configuration parameters 104 | by setting variables in the command line or in the environment. Here 105 | is an example: 106 | 107 | ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108 | 109 | *Note Defining Variables::, for more details. 110 | 111 | Compiling For Multiple Architectures 112 | ==================================== 113 | 114 | You can compile the package for more than one kind of computer at the 115 | same time, by placing the object files for each architecture in their 116 | own directory. To do this, you can use GNU `make'. `cd' to the 117 | directory where you want the object files and executables to go and run 118 | the `configure' script. `configure' automatically checks for the 119 | source code in the directory that `configure' is in and in `..'. This 120 | is known as a "VPATH" build. 121 | 122 | With a non-GNU `make', it is safer to compile the package for one 123 | architecture at a time in the source code directory. After you have 124 | installed the package for one architecture, use `make distclean' before 125 | reconfiguring for another architecture. 126 | 127 | On MacOS X 10.5 and later systems, you can create libraries and 128 | executables that work on multiple system types--known as "fat" or 129 | "universal" binaries--by specifying multiple `-arch' options to the 130 | compiler but only a single `-arch' option to the preprocessor. Like 131 | this: 132 | 133 | ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134 | CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135 | CPP="gcc -E" CXXCPP="g++ -E" 136 | 137 | This is not guaranteed to produce working output in all cases, you 138 | may have to build one architecture at a time and combine the results 139 | using the `lipo' tool if you have problems. 140 | 141 | Installation Names 142 | ================== 143 | 144 | By default, `make install' installs the package's commands under 145 | `/usr/local/bin', include files under `/usr/local/include', etc. You 146 | can specify an installation prefix other than `/usr/local' by giving 147 | `configure' the option `--prefix=PREFIX', where PREFIX must be an 148 | absolute file name. 149 | 150 | You can specify separate installation prefixes for 151 | architecture-specific files and architecture-independent files. If you 152 | pass the option `--exec-prefix=PREFIX' to `configure', the package uses 153 | PREFIX as the prefix for installing programs and libraries. 154 | Documentation and other data files still use the regular prefix. 155 | 156 | In addition, if you use an unusual directory layout you can give 157 | options like `--bindir=DIR' to specify different values for particular 158 | kinds of files. Run `configure --help' for a list of the directories 159 | you can set and what kinds of files go in them. In general, the 160 | default for these options is expressed in terms of `${prefix}', so that 161 | specifying just `--prefix' will affect all of the other directory 162 | specifications that were not explicitly provided. 163 | 164 | The most portable way to affect installation locations is to pass the 165 | correct locations to `configure'; however, many packages provide one or 166 | both of the following shortcuts of passing variable assignments to the 167 | `make install' command line to change installation locations without 168 | having to reconfigure or recompile. 169 | 170 | The first method involves providing an override variable for each 171 | affected directory. For example, `make install 172 | prefix=/alternate/directory' will choose an alternate location for all 173 | directory configuration variables that were expressed in terms of 174 | `${prefix}'. Any directories that were specified during `configure', 175 | but not in terms of `${prefix}', must each be overridden at install 176 | time for the entire installation to be relocated. The approach of 177 | makefile variable overrides for each directory variable is required by 178 | the GNU Coding Standards, and ideally causes no recompilation. 179 | However, some platforms have known limitations with the semantics of 180 | shared libraries that end up requiring recompilation when using this 181 | method, particularly noticeable in packages that use GNU Libtool. 182 | 183 | The second method involves providing the `DESTDIR' variable. For 184 | example, `make install DESTDIR=/alternate/directory' will prepend 185 | `/alternate/directory' before all installation names. The approach of 186 | `DESTDIR' overrides is not required by the GNU Coding Standards, and 187 | does not work on platforms that have drive letters. On the other hand, 188 | it does better at avoiding recompilation issues, and works well even 189 | when some directory options were not specified in terms of `${prefix}' 190 | at `configure' time. 191 | 192 | Optional Features 193 | ================= 194 | 195 | If the package supports it, you can cause programs to be installed 196 | with an extra prefix or suffix on their names by giving `configure' the 197 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198 | 199 | Some packages pay attention to `--enable-FEATURE' options to 200 | `configure', where FEATURE indicates an optional part of the package. 201 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE 202 | is something like `gnu-as' or `x' (for the X Window System). The 203 | `README' should mention any `--enable-' and `--with-' options that the 204 | package recognizes. 205 | 206 | For packages that use the X Window System, `configure' can usually 207 | find the X include and library files automatically, but if it doesn't, 208 | you can use the `configure' options `--x-includes=DIR' and 209 | `--x-libraries=DIR' to specify their locations. 210 | 211 | Some packages offer the ability to configure how verbose the 212 | execution of `make' will be. For these packages, running `./configure 213 | --enable-silent-rules' sets the default to minimal output, which can be 214 | overridden with `make V=1'; while running `./configure 215 | --disable-silent-rules' sets the default to verbose, which can be 216 | overridden with `make V=0'. 217 | 218 | Particular systems 219 | ================== 220 | 221 | On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222 | CC is not installed, it is recommended to use the following options in 223 | order to use an ANSI C compiler: 224 | 225 | ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226 | 227 | and if that doesn't work, install pre-built binaries of GCC for HP-UX. 228 | 229 | HP-UX `make' updates targets which have the same time stamps as 230 | their prerequisites, which makes it generally unusable when shipped 231 | generated files such as `configure' are involved. Use GNU `make' 232 | instead. 233 | 234 | On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235 | parse its `' header file. The option `-nodtk' can be used as 236 | a workaround. If GNU CC is not installed, it is therefore recommended 237 | to try 238 | 239 | ./configure CC="cc" 240 | 241 | and if that doesn't work, try 242 | 243 | ./configure CC="cc -nodtk" 244 | 245 | On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246 | directory contains several dysfunctional programs; working variants of 247 | these programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248 | in your `PATH', put it _after_ `/usr/bin'. 249 | 250 | On Haiku, software installed for all users goes in `/boot/common', 251 | not `/usr/local'. It is recommended to use the following options: 252 | 253 | ./configure --prefix=/boot/common 254 | 255 | Specifying the System Type 256 | ========================== 257 | 258 | There may be some features `configure' cannot figure out 259 | automatically, but needs to determine by the type of machine the package 260 | will run on. Usually, assuming the package is built to be run on the 261 | _same_ architectures, `configure' can figure that out, but if it prints 262 | a message saying it cannot guess the machine type, give it the 263 | `--build=TYPE' option. TYPE can either be a short name for the system 264 | type, such as `sun4', or a canonical name which has the form: 265 | 266 | CPU-COMPANY-SYSTEM 267 | 268 | where SYSTEM can have one of these forms: 269 | 270 | OS 271 | KERNEL-OS 272 | 273 | See the file `config.sub' for the possible values of each field. If 274 | `config.sub' isn't included in this package, then this package doesn't 275 | need to know the machine type. 276 | 277 | If you are _building_ compiler tools for cross-compiling, you should 278 | use the option `--target=TYPE' to select the type of system they will 279 | produce code for. 280 | 281 | If you want to _use_ a cross compiler, that generates code for a 282 | platform different from the build platform, you should specify the 283 | "host" platform (i.e., that on which the generated programs will 284 | eventually be run) with `--host=TYPE'. 285 | 286 | Sharing Defaults 287 | ================ 288 | 289 | If you want to set default values for `configure' scripts to share, 290 | you can create a site shell script called `config.site' that gives 291 | default values for variables like `CC', `cache_file', and `prefix'. 292 | `configure' looks for `PREFIX/share/config.site' if it exists, then 293 | `PREFIX/etc/config.site' if it exists. Or, you can set the 294 | `CONFIG_SITE' environment variable to the location of the site script. 295 | A warning: not all `configure' scripts look for a site script. 296 | 297 | Defining Variables 298 | ================== 299 | 300 | Variables not defined in a site shell script can be set in the 301 | environment passed to `configure'. However, some packages may run 302 | configure again during the build, and the customized values of these 303 | variables may be lost. In order to avoid this problem, you should set 304 | them in the `configure' command line, using `VAR=value'. For example: 305 | 306 | ./configure CC=/usr/local2/bin/gcc 307 | 308 | causes the specified `gcc' to be used as the C compiler (unless it is 309 | overridden in the site shell script). 310 | 311 | Unfortunately, this technique does not work for `CONFIG_SHELL' due to 312 | an Autoconf limitation. Until the limitation is lifted, you can use 313 | this workaround: 314 | 315 | CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 316 | 317 | `configure' Invocation 318 | ====================== 319 | 320 | `configure' recognizes the following options to control how it 321 | operates. 322 | 323 | `--help' 324 | `-h' 325 | Print a summary of all of the options to `configure', and exit. 326 | 327 | `--help=short' 328 | `--help=recursive' 329 | Print a summary of the options unique to this package's 330 | `configure', and exit. The `short' variant lists options used 331 | only in the top level, while the `recursive' variant lists options 332 | also present in any nested packages. 333 | 334 | `--version' 335 | `-V' 336 | Print the version of Autoconf used to generate the `configure' 337 | script, and exit. 338 | 339 | `--cache-file=FILE' 340 | Enable the cache: use and save the results of the tests in FILE, 341 | traditionally `config.cache'. FILE defaults to `/dev/null' to 342 | disable caching. 343 | 344 | `--config-cache' 345 | `-C' 346 | Alias for `--cache-file=config.cache'. 347 | 348 | `--quiet' 349 | `--silent' 350 | `-q' 351 | Do not print messages saying which checks are being made. To 352 | suppress all normal output, redirect it to `/dev/null' (any error 353 | messages will still be shown). 354 | 355 | `--srcdir=DIR' 356 | Look for the package's source code in directory DIR. Usually 357 | `configure' can determine that directory automatically. 358 | 359 | `--prefix=DIR' 360 | Use DIR as the installation prefix. *note Installation Names:: 361 | for more details, including other options available for fine-tuning 362 | the installation locations. 363 | 364 | `--no-create' 365 | `-n' 366 | Run the configure checks, but stop before creating any output 367 | files. 368 | 369 | `configure' also accepts some other, not widely useful, options. Run 370 | `configure --help' for more details. -------------------------------------------------------------------------------- /extenal/shmdb/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014- yunnysunny@gmail.com 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /extenal/shmdb/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.14.1 from Makefile.am. 2 | # Makefile. Generated from Makefile.in by configure. 3 | 4 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | 16 | 17 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 18 | am__make_running_with_option = \ 19 | case $${target_option-} in \ 20 | ?) ;; \ 21 | *) echo "am__make_running_with_option: internal error: invalid" \ 22 | "target option '$${target_option-}' specified" >&2; \ 23 | exit 1;; \ 24 | esac; \ 25 | has_opt=no; \ 26 | sane_makeflags=$$MAKEFLAGS; \ 27 | if $(am__is_gnu_make); then \ 28 | sane_makeflags=$$MFLAGS; \ 29 | else \ 30 | case $$MAKEFLAGS in \ 31 | *\\[\ \ ]*) \ 32 | bs=\\; \ 33 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 34 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 35 | esac; \ 36 | fi; \ 37 | skip_next=no; \ 38 | strip_trailopt () \ 39 | { \ 40 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 41 | }; \ 42 | for flg in $$sane_makeflags; do \ 43 | test $$skip_next = yes && { skip_next=no; continue; }; \ 44 | case $$flg in \ 45 | *=*|--*) continue;; \ 46 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 47 | -*I?*) strip_trailopt 'I';; \ 48 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 49 | -*O?*) strip_trailopt 'O';; \ 50 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 51 | -*l?*) strip_trailopt 'l';; \ 52 | -[dEDm]) skip_next=yes;; \ 53 | -[JT]) skip_next=yes;; \ 54 | esac; \ 55 | case $$flg in \ 56 | *$$target_option*) has_opt=yes; break;; \ 57 | esac; \ 58 | done; \ 59 | test $$has_opt = yes 60 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 61 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 62 | pkgdatadir = $(datadir)/appexp 63 | pkgincludedir = $(includedir)/appexp 64 | pkglibdir = $(libdir)/appexp 65 | pkglibexecdir = $(libexecdir)/appexp 66 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 67 | install_sh_DATA = $(install_sh) -c -m 644 68 | install_sh_PROGRAM = $(install_sh) -c 69 | install_sh_SCRIPT = $(install_sh) -c 70 | INSTALL_HEADER = $(INSTALL_DATA) 71 | transform = $(program_transform_name) 72 | NORMAL_INSTALL = : 73 | PRE_INSTALL = : 74 | POST_INSTALL = : 75 | NORMAL_UNINSTALL = : 76 | PRE_UNINSTALL = : 77 | POST_UNINSTALL = : 78 | subdir = . 79 | DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ 80 | $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ 81 | $(top_srcdir)/configure $(am__configure_deps) COPYING compile \ 82 | depcomp install-sh missing ltmain.sh 83 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 84 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 85 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 86 | $(ACLOCAL_M4) 87 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 88 | configure.lineno config.status.lineno 89 | mkinstalldirs = $(install_sh) -d 90 | CONFIG_CLEAN_FILES = 91 | CONFIG_CLEAN_VPATH_FILES = 92 | AM_V_P = $(am__v_P_$(V)) 93 | am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) 94 | am__v_P_0 = false 95 | am__v_P_1 = : 96 | AM_V_GEN = $(am__v_GEN_$(V)) 97 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) 98 | am__v_GEN_0 = @echo " GEN " $@; 99 | am__v_GEN_1 = 100 | AM_V_at = $(am__v_at_$(V)) 101 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) 102 | am__v_at_0 = @ 103 | am__v_at_1 = 104 | SOURCES = 105 | DIST_SOURCES = 106 | RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ 107 | ctags-recursive dvi-recursive html-recursive info-recursive \ 108 | install-data-recursive install-dvi-recursive \ 109 | install-exec-recursive install-html-recursive \ 110 | install-info-recursive install-pdf-recursive \ 111 | install-ps-recursive install-recursive installcheck-recursive \ 112 | installdirs-recursive pdf-recursive ps-recursive \ 113 | tags-recursive uninstall-recursive 114 | am__can_run_installinfo = \ 115 | case $$AM_UPDATE_INFO_DIR in \ 116 | n|no|NO) false;; \ 117 | *) (install-info --version) >/dev/null 2>&1;; \ 118 | esac 119 | RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ 120 | distclean-recursive maintainer-clean-recursive 121 | am__recursive_targets = \ 122 | $(RECURSIVE_TARGETS) \ 123 | $(RECURSIVE_CLEAN_TARGETS) \ 124 | $(am__extra_recursive_targets) 125 | AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ 126 | cscope distdir dist dist-all distcheck 127 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 128 | # Read a list of newline-separated strings from the standard input, 129 | # and print each of them once, without duplicates. Input order is 130 | # *not* preserved. 131 | am__uniquify_input = $(AWK) '\ 132 | BEGIN { nonempty = 0; } \ 133 | { items[$$0] = 1; nonempty = 1; } \ 134 | END { if (nonempty) { for (i in items) print i; }; } \ 135 | ' 136 | # Make sure the list of sources is unique. This is necessary because, 137 | # e.g., the same source file might be shared among _SOURCES variables 138 | # for different programs/libraries. 139 | am__define_uniq_tagged_files = \ 140 | list='$(am__tagged_files)'; \ 141 | unique=`for i in $$list; do \ 142 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 143 | done | $(am__uniquify_input)` 144 | ETAGS = etags 145 | CTAGS = ctags 146 | CSCOPE = cscope 147 | DIST_SUBDIRS = $(SUBDIRS) 148 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 149 | distdir = $(PACKAGE)-$(VERSION) 150 | top_distdir = $(distdir) 151 | am__remove_distdir = \ 152 | if test -d "$(distdir)"; then \ 153 | find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ 154 | && rm -rf "$(distdir)" \ 155 | || { sleep 5 && rm -rf "$(distdir)"; }; \ 156 | else :; fi 157 | am__post_remove_distdir = $(am__remove_distdir) 158 | am__relativize = \ 159 | dir0=`pwd`; \ 160 | sed_first='s,^\([^/]*\)/.*$$,\1,'; \ 161 | sed_rest='s,^[^/]*/*,,'; \ 162 | sed_last='s,^.*/\([^/]*\)$$,\1,'; \ 163 | sed_butlast='s,/*[^/]*$$,,'; \ 164 | while test -n "$$dir1"; do \ 165 | first=`echo "$$dir1" | sed -e "$$sed_first"`; \ 166 | if test "$$first" != "."; then \ 167 | if test "$$first" = ".."; then \ 168 | dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ 169 | dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ 170 | else \ 171 | first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ 172 | if test "$$first2" = "$$first"; then \ 173 | dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ 174 | else \ 175 | dir2="../$$dir2"; \ 176 | fi; \ 177 | dir0="$$dir0"/"$$first"; \ 178 | fi; \ 179 | fi; \ 180 | dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ 181 | done; \ 182 | reldir="$$dir2" 183 | DIST_ARCHIVES = $(distdir).tar.gz 184 | GZIP_ENV = --best 185 | DIST_TARGETS = dist-gzip 186 | distuninstallcheck_listfiles = find . -type f -print 187 | am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ 188 | | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' 189 | distcleancheck_listfiles = find . -type f -print 190 | ACLOCAL = ${SHELL} /home/gaoyang/mm/missing aclocal-1.14 191 | AMTAR = $${TAR-tar} 192 | AM_DEFAULT_VERBOSITY = 1 193 | AUTOCONF = ${SHELL} /home/gaoyang/mm/missing autoconf 194 | AUTOHEADER = ${SHELL} /home/gaoyang/mm/missing autoheader 195 | AUTOMAKE = ${SHELL} /home/gaoyang/mm/missing automake-1.14 196 | AWK = mawk 197 | CC = gcc 198 | CCDEPMODE = depmode=gcc3 199 | CFLAGS = -g -O2 200 | CPPFLAGS = 201 | CYGPATH_W = echo 202 | DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"appexp\" -DVERSION=\"0.1.00\" 203 | DEPDIR = .deps 204 | ECHO_C = 205 | ECHO_N = -n 206 | ECHO_T = 207 | EXEEXT = 208 | INSTALL = /usr/bin/install -c 209 | INSTALL_DATA = ${INSTALL} -m 644 210 | INSTALL_PROGRAM = ${INSTALL} 211 | INSTALL_SCRIPT = ${INSTALL} 212 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s 213 | LDFLAGS = 214 | LIBOBJS = 215 | LIBS = 216 | LTLIBOBJS = 217 | MAKEINFO = ${SHELL} /home/gaoyang/mm/missing makeinfo 218 | MKDIR_P = /bin/mkdir -p 219 | OBJEXT = o 220 | PACKAGE = appexp 221 | PACKAGE_BUGREPORT = 222 | PACKAGE_NAME = 223 | PACKAGE_STRING = 224 | PACKAGE_TARNAME = 225 | PACKAGE_URL = 226 | PACKAGE_VERSION = 227 | PATH_SEPARATOR = : 228 | RANLIB = ranlib 229 | SET_MAKE = 230 | SHELL = /bin/bash 231 | STRIP = 232 | VERSION = 0.1.00 233 | abs_builddir = /home/gaoyang/mm 234 | abs_srcdir = /home/gaoyang/mm 235 | abs_top_builddir = /home/gaoyang/mm 236 | abs_top_srcdir = /home/gaoyang/mm 237 | ac_ct_CC = gcc 238 | am__include = include 239 | am__leading_dot = . 240 | am__quote = 241 | am__tar = $${TAR-tar} chof - "$$tardir" 242 | am__untar = $${TAR-tar} xf - 243 | bindir = ${exec_prefix}/bin 244 | build_alias = 245 | builddir = . 246 | datadir = ${datarootdir} 247 | datarootdir = ${prefix}/share 248 | docdir = ${datarootdir}/doc/${PACKAGE} 249 | dvidir = ${docdir} 250 | exec_prefix = ${prefix} 251 | host_alias = 252 | htmldir = ${docdir} 253 | includedir = ${prefix}/include 254 | infodir = ${datarootdir}/info 255 | install_sh = ${SHELL} /home/gaoyang/mm/install-sh 256 | libdir = ${exec_prefix}/lib 257 | libexecdir = ${exec_prefix}/libexec 258 | localedir = ${datarootdir}/locale 259 | localstatedir = ${prefix}/var 260 | mandir = ${datarootdir}/man 261 | mkdir_p = $(MKDIR_P) 262 | oldincludedir = /usr/include 263 | pdfdir = ${docdir} 264 | prefix = /usr/local 265 | program_transform_name = s,x,x, 266 | psdir = ${docdir} 267 | sbindir = ${exec_prefix}/sbin 268 | sharedstatedir = ${prefix}/com 269 | srcdir = . 270 | sysconfdir = ${prefix}/etc 271 | target_alias = 272 | top_build_prefix = 273 | top_builddir = . 274 | top_srcdir = . 275 | SUBDIRS = src test 276 | all: all-recursive 277 | 278 | .SUFFIXES: 279 | am--refresh: Makefile 280 | @: 281 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 282 | @for dep in $?; do \ 283 | case '$(am__configure_deps)' in \ 284 | *$$dep*) \ 285 | echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ 286 | $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ 287 | && exit 0; \ 288 | exit 1;; \ 289 | esac; \ 290 | done; \ 291 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ 292 | $(am__cd) $(top_srcdir) && \ 293 | $(AUTOMAKE) --gnu Makefile 294 | .PRECIOUS: Makefile 295 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 296 | @case '$?' in \ 297 | *config.status*) \ 298 | echo ' $(SHELL) ./config.status'; \ 299 | $(SHELL) ./config.status;; \ 300 | *) \ 301 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ 302 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ 303 | esac; 304 | 305 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 306 | $(SHELL) ./config.status --recheck 307 | 308 | $(top_srcdir)/configure: $(am__configure_deps) 309 | $(am__cd) $(srcdir) && $(AUTOCONF) 310 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 311 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) 312 | $(am__aclocal_m4_deps): 313 | 314 | # This directory's subdirectories are mostly independent; you can cd 315 | # into them and run 'make' without going through this Makefile. 316 | # To change the values of 'make' variables: instead of editing Makefiles, 317 | # (1) if the variable is set in 'config.status', edit 'config.status' 318 | # (which will cause the Makefiles to be regenerated when you run 'make'); 319 | # (2) otherwise, pass the desired values on the 'make' command line. 320 | $(am__recursive_targets): 321 | @fail=; \ 322 | if $(am__make_keepgoing); then \ 323 | failcom='fail=yes'; \ 324 | else \ 325 | failcom='exit 1'; \ 326 | fi; \ 327 | dot_seen=no; \ 328 | target=`echo $@ | sed s/-recursive//`; \ 329 | case "$@" in \ 330 | distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ 331 | *) list='$(SUBDIRS)' ;; \ 332 | esac; \ 333 | for subdir in $$list; do \ 334 | echo "Making $$target in $$subdir"; \ 335 | if test "$$subdir" = "."; then \ 336 | dot_seen=yes; \ 337 | local_target="$$target-am"; \ 338 | else \ 339 | local_target="$$target"; \ 340 | fi; \ 341 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 342 | || eval $$failcom; \ 343 | done; \ 344 | if test "$$dot_seen" = "no"; then \ 345 | $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ 346 | fi; test -z "$$fail" 347 | 348 | ID: $(am__tagged_files) 349 | $(am__define_uniq_tagged_files); mkid -fID $$unique 350 | tags: tags-recursive 351 | TAGS: tags 352 | 353 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 354 | set x; \ 355 | here=`pwd`; \ 356 | if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 357 | include_option=--etags-include; \ 358 | empty_fix=.; \ 359 | else \ 360 | include_option=--include; \ 361 | empty_fix=; \ 362 | fi; \ 363 | list='$(SUBDIRS)'; for subdir in $$list; do \ 364 | if test "$$subdir" = .; then :; else \ 365 | test ! -f $$subdir/TAGS || \ 366 | set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ 367 | fi; \ 368 | done; \ 369 | $(am__define_uniq_tagged_files); \ 370 | shift; \ 371 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 372 | test -n "$$unique" || unique=$$empty_fix; \ 373 | if test $$# -gt 0; then \ 374 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 375 | "$$@" $$unique; \ 376 | else \ 377 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 378 | $$unique; \ 379 | fi; \ 380 | fi 381 | ctags: ctags-recursive 382 | 383 | CTAGS: ctags 384 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 385 | $(am__define_uniq_tagged_files); \ 386 | test -z "$(CTAGS_ARGS)$$unique" \ 387 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 388 | $$unique 389 | 390 | GTAGS: 391 | here=`$(am__cd) $(top_builddir) && pwd` \ 392 | && $(am__cd) $(top_srcdir) \ 393 | && gtags -i $(GTAGS_ARGS) "$$here" 394 | cscope: cscope.files 395 | test ! -s cscope.files \ 396 | || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) 397 | clean-cscope: 398 | -rm -f cscope.files 399 | cscope.files: clean-cscope cscopelist 400 | cscopelist: cscopelist-recursive 401 | 402 | cscopelist-am: $(am__tagged_files) 403 | list='$(am__tagged_files)'; \ 404 | case "$(srcdir)" in \ 405 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 406 | *) sdir=$(subdir)/$(srcdir) ;; \ 407 | esac; \ 408 | for i in $$list; do \ 409 | if test -f "$$i"; then \ 410 | echo "$(subdir)/$$i"; \ 411 | else \ 412 | echo "$$sdir/$$i"; \ 413 | fi; \ 414 | done >> $(top_builddir)/cscope.files 415 | 416 | distclean-tags: 417 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 418 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 419 | 420 | distdir: $(DISTFILES) 421 | $(am__remove_distdir) 422 | test -d "$(distdir)" || mkdir "$(distdir)" 423 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 424 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 425 | list='$(DISTFILES)'; \ 426 | dist_files=`for file in $$list; do echo $$file; done | \ 427 | sed -e "s|^$$srcdirstrip/||;t" \ 428 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 429 | case $$dist_files in \ 430 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 431 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 432 | sort -u` ;; \ 433 | esac; \ 434 | for file in $$dist_files; do \ 435 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 436 | if test -d $$d/$$file; then \ 437 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 438 | if test -d "$(distdir)/$$file"; then \ 439 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 440 | fi; \ 441 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 442 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 443 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 444 | fi; \ 445 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 446 | else \ 447 | test -f "$(distdir)/$$file" \ 448 | || cp -p $$d/$$file "$(distdir)/$$file" \ 449 | || exit 1; \ 450 | fi; \ 451 | done 452 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ 453 | if test "$$subdir" = .; then :; else \ 454 | $(am__make_dryrun) \ 455 | || test -d "$(distdir)/$$subdir" \ 456 | || $(MKDIR_P) "$(distdir)/$$subdir" \ 457 | || exit 1; \ 458 | dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ 459 | $(am__relativize); \ 460 | new_distdir=$$reldir; \ 461 | dir1=$$subdir; dir2="$(top_distdir)"; \ 462 | $(am__relativize); \ 463 | new_top_distdir=$$reldir; \ 464 | echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ 465 | echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ 466 | ($(am__cd) $$subdir && \ 467 | $(MAKE) $(AM_MAKEFLAGS) \ 468 | top_distdir="$$new_top_distdir" \ 469 | distdir="$$new_distdir" \ 470 | am__remove_distdir=: \ 471 | am__skip_length_check=: \ 472 | am__skip_mode_fix=: \ 473 | distdir) \ 474 | || exit 1; \ 475 | fi; \ 476 | done 477 | -test -n "$(am__skip_mode_fix)" \ 478 | || find "$(distdir)" -type d ! -perm -755 \ 479 | -exec chmod u+rwx,go+rx {} \; -o \ 480 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ 481 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ 482 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ 483 | || chmod -R a+r "$(distdir)" 484 | dist-gzip: distdir 485 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 486 | $(am__post_remove_distdir) 487 | 488 | dist-bzip2: distdir 489 | tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 490 | $(am__post_remove_distdir) 491 | 492 | dist-lzip: distdir 493 | tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz 494 | $(am__post_remove_distdir) 495 | 496 | dist-xz: distdir 497 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz 498 | $(am__post_remove_distdir) 499 | 500 | dist-tarZ: distdir 501 | @echo WARNING: "Support for shar distribution archives is" \ 502 | "deprecated." >&2 503 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 504 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z 505 | $(am__post_remove_distdir) 506 | 507 | dist-shar: distdir 508 | @echo WARNING: "Support for distribution archives compressed with" \ 509 | "legacy program 'compress' is deprecated." >&2 510 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 511 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz 512 | $(am__post_remove_distdir) 513 | 514 | dist-zip: distdir 515 | -rm -f $(distdir).zip 516 | zip -rq $(distdir).zip $(distdir) 517 | $(am__post_remove_distdir) 518 | 519 | dist dist-all: 520 | $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' 521 | $(am__post_remove_distdir) 522 | 523 | # This target untars the dist file and tries a VPATH configuration. Then 524 | # it guarantees that the distribution is self-contained by making another 525 | # tarfile. 526 | distcheck: dist 527 | case '$(DIST_ARCHIVES)' in \ 528 | *.tar.gz*) \ 529 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ 530 | *.tar.bz2*) \ 531 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ 532 | *.tar.lz*) \ 533 | lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ 534 | *.tar.xz*) \ 535 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ 536 | *.tar.Z*) \ 537 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ 538 | *.shar.gz*) \ 539 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ 540 | *.zip*) \ 541 | unzip $(distdir).zip ;;\ 542 | esac 543 | chmod -R a-w $(distdir) 544 | chmod u+w $(distdir) 545 | mkdir $(distdir)/_build $(distdir)/_inst 546 | chmod a-w $(distdir) 547 | test -d $(distdir)/_build || exit 0; \ 548 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ 549 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ 550 | && am__cwd=`pwd` \ 551 | && $(am__cd) $(distdir)/_build \ 552 | && ../configure \ 553 | $(AM_DISTCHECK_CONFIGURE_FLAGS) \ 554 | $(DISTCHECK_CONFIGURE_FLAGS) \ 555 | --srcdir=.. --prefix="$$dc_install_base" \ 556 | && $(MAKE) $(AM_MAKEFLAGS) \ 557 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ 558 | && $(MAKE) $(AM_MAKEFLAGS) check \ 559 | && $(MAKE) $(AM_MAKEFLAGS) install \ 560 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ 561 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ 562 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ 563 | distuninstallcheck \ 564 | && chmod -R a-w "$$dc_install_base" \ 565 | && ({ \ 566 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ 567 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ 568 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ 569 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ 570 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ 571 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ 572 | && rm -rf "$$dc_destdir" \ 573 | && $(MAKE) $(AM_MAKEFLAGS) dist \ 574 | && rm -rf $(DIST_ARCHIVES) \ 575 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ 576 | && cd "$$am__cwd" \ 577 | || exit 1 578 | $(am__post_remove_distdir) 579 | @(echo "$(distdir) archives ready for distribution: "; \ 580 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ 581 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' 582 | distuninstallcheck: 583 | @test -n '$(distuninstallcheck_dir)' || { \ 584 | echo 'ERROR: trying to run $@ with an empty' \ 585 | '$$(distuninstallcheck_dir)' >&2; \ 586 | exit 1; \ 587 | }; \ 588 | $(am__cd) '$(distuninstallcheck_dir)' || { \ 589 | echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ 590 | exit 1; \ 591 | }; \ 592 | test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ 593 | || { echo "ERROR: files left after uninstall:" ; \ 594 | if test -n "$(DESTDIR)"; then \ 595 | echo " (check DESTDIR support)"; \ 596 | fi ; \ 597 | $(distuninstallcheck_listfiles) ; \ 598 | exit 1; } >&2 599 | distcleancheck: distclean 600 | @if test '$(srcdir)' = . ; then \ 601 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ 602 | exit 1 ; \ 603 | fi 604 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ 605 | || { echo "ERROR: files left in build directory after distclean:" ; \ 606 | $(distcleancheck_listfiles) ; \ 607 | exit 1; } >&2 608 | check-am: all-am 609 | check: check-recursive 610 | all-am: Makefile 611 | installdirs: installdirs-recursive 612 | installdirs-am: 613 | install: install-recursive 614 | install-exec: install-exec-recursive 615 | install-data: install-data-recursive 616 | uninstall: uninstall-recursive 617 | 618 | install-am: all-am 619 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 620 | 621 | installcheck: installcheck-recursive 622 | install-strip: 623 | if test -z '$(STRIP)'; then \ 624 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 625 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 626 | install; \ 627 | else \ 628 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 629 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 630 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 631 | fi 632 | mostlyclean-generic: 633 | 634 | clean-generic: 635 | 636 | distclean-generic: 637 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 638 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 639 | 640 | maintainer-clean-generic: 641 | @echo "This command is intended for maintainers to use" 642 | @echo "it deletes files that may require special tools to rebuild." 643 | clean: clean-recursive 644 | 645 | clean-am: clean-generic mostlyclean-am 646 | 647 | distclean: distclean-recursive 648 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 649 | -rm -f Makefile 650 | distclean-am: clean-am distclean-generic distclean-tags 651 | 652 | dvi: dvi-recursive 653 | 654 | dvi-am: 655 | 656 | html: html-recursive 657 | 658 | html-am: 659 | 660 | info: info-recursive 661 | 662 | info-am: 663 | 664 | install-data-am: 665 | 666 | install-dvi: install-dvi-recursive 667 | 668 | install-dvi-am: 669 | 670 | install-exec-am: 671 | 672 | install-html: install-html-recursive 673 | 674 | install-html-am: 675 | 676 | install-info: install-info-recursive 677 | 678 | install-info-am: 679 | 680 | install-man: 681 | 682 | install-pdf: install-pdf-recursive 683 | 684 | install-pdf-am: 685 | 686 | install-ps: install-ps-recursive 687 | 688 | install-ps-am: 689 | 690 | installcheck-am: 691 | 692 | maintainer-clean: maintainer-clean-recursive 693 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 694 | -rm -rf $(top_srcdir)/autom4te.cache 695 | -rm -f Makefile 696 | maintainer-clean-am: distclean-am maintainer-clean-generic 697 | 698 | mostlyclean: mostlyclean-recursive 699 | 700 | mostlyclean-am: mostlyclean-generic 701 | 702 | pdf: pdf-recursive 703 | 704 | pdf-am: 705 | 706 | ps: ps-recursive 707 | 708 | ps-am: 709 | 710 | uninstall-am: 711 | 712 | .MAKE: $(am__recursive_targets) install-am install-strip 713 | 714 | .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ 715 | am--refresh check check-am clean clean-cscope clean-generic \ 716 | cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ 717 | dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ 718 | distcheck distclean distclean-generic distclean-tags \ 719 | distcleancheck distdir distuninstallcheck dvi dvi-am html \ 720 | html-am info info-am install install-am install-data \ 721 | install-data-am install-dvi install-dvi-am install-exec \ 722 | install-exec-am install-html install-html-am install-info \ 723 | install-info-am install-man install-pdf install-pdf-am \ 724 | install-ps install-ps-am install-strip installcheck \ 725 | installcheck-am installdirs installdirs-am maintainer-clean \ 726 | maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ 727 | pdf-am ps ps-am tags tags-am uninstall uninstall-am 728 | 729 | 730 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 731 | # Otherwise a system limit (for SysV at least) may be exceeded. 732 | .NOEXPORT: 733 | -------------------------------------------------------------------------------- /extenal/shmdb/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src test 2 | 3 | -------------------------------------------------------------------------------- /extenal/shmdb/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.14.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | VPATH = @srcdir@ 17 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 18 | am__make_running_with_option = \ 19 | case $${target_option-} in \ 20 | ?) ;; \ 21 | *) echo "am__make_running_with_option: internal error: invalid" \ 22 | "target option '$${target_option-}' specified" >&2; \ 23 | exit 1;; \ 24 | esac; \ 25 | has_opt=no; \ 26 | sane_makeflags=$$MAKEFLAGS; \ 27 | if $(am__is_gnu_make); then \ 28 | sane_makeflags=$$MFLAGS; \ 29 | else \ 30 | case $$MAKEFLAGS in \ 31 | *\\[\ \ ]*) \ 32 | bs=\\; \ 33 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 34 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 35 | esac; \ 36 | fi; \ 37 | skip_next=no; \ 38 | strip_trailopt () \ 39 | { \ 40 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 41 | }; \ 42 | for flg in $$sane_makeflags; do \ 43 | test $$skip_next = yes && { skip_next=no; continue; }; \ 44 | case $$flg in \ 45 | *=*|--*) continue;; \ 46 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 47 | -*I?*) strip_trailopt 'I';; \ 48 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 49 | -*O?*) strip_trailopt 'O';; \ 50 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 51 | -*l?*) strip_trailopt 'l';; \ 52 | -[dEDm]) skip_next=yes;; \ 53 | -[JT]) skip_next=yes;; \ 54 | esac; \ 55 | case $$flg in \ 56 | *$$target_option*) has_opt=yes; break;; \ 57 | esac; \ 58 | done; \ 59 | test $$has_opt = yes 60 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 61 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 62 | pkgdatadir = $(datadir)/@PACKAGE@ 63 | pkgincludedir = $(includedir)/@PACKAGE@ 64 | pkglibdir = $(libdir)/@PACKAGE@ 65 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 66 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 67 | install_sh_DATA = $(install_sh) -c -m 644 68 | install_sh_PROGRAM = $(install_sh) -c 69 | install_sh_SCRIPT = $(install_sh) -c 70 | INSTALL_HEADER = $(INSTALL_DATA) 71 | transform = $(program_transform_name) 72 | NORMAL_INSTALL = : 73 | PRE_INSTALL = : 74 | POST_INSTALL = : 75 | NORMAL_UNINSTALL = : 76 | PRE_UNINSTALL = : 77 | POST_UNINSTALL = : 78 | subdir = . 79 | DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ 80 | $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ 81 | $(top_srcdir)/configure $(am__configure_deps) COPYING compile \ 82 | depcomp install-sh missing ltmain.sh 83 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 84 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 85 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 86 | $(ACLOCAL_M4) 87 | am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ 88 | configure.lineno config.status.lineno 89 | mkinstalldirs = $(install_sh) -d 90 | CONFIG_CLEAN_FILES = 91 | CONFIG_CLEAN_VPATH_FILES = 92 | AM_V_P = $(am__v_P_@AM_V@) 93 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) 94 | am__v_P_0 = false 95 | am__v_P_1 = : 96 | AM_V_GEN = $(am__v_GEN_@AM_V@) 97 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 98 | am__v_GEN_0 = @echo " GEN " $@; 99 | am__v_GEN_1 = 100 | AM_V_at = $(am__v_at_@AM_V@) 101 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 102 | am__v_at_0 = @ 103 | am__v_at_1 = 104 | SOURCES = 105 | DIST_SOURCES = 106 | RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ 107 | ctags-recursive dvi-recursive html-recursive info-recursive \ 108 | install-data-recursive install-dvi-recursive \ 109 | install-exec-recursive install-html-recursive \ 110 | install-info-recursive install-pdf-recursive \ 111 | install-ps-recursive install-recursive installcheck-recursive \ 112 | installdirs-recursive pdf-recursive ps-recursive \ 113 | tags-recursive uninstall-recursive 114 | am__can_run_installinfo = \ 115 | case $$AM_UPDATE_INFO_DIR in \ 116 | n|no|NO) false;; \ 117 | *) (install-info --version) >/dev/null 2>&1;; \ 118 | esac 119 | RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ 120 | distclean-recursive maintainer-clean-recursive 121 | am__recursive_targets = \ 122 | $(RECURSIVE_TARGETS) \ 123 | $(RECURSIVE_CLEAN_TARGETS) \ 124 | $(am__extra_recursive_targets) 125 | AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ 126 | cscope distdir dist dist-all distcheck 127 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 128 | # Read a list of newline-separated strings from the standard input, 129 | # and print each of them once, without duplicates. Input order is 130 | # *not* preserved. 131 | am__uniquify_input = $(AWK) '\ 132 | BEGIN { nonempty = 0; } \ 133 | { items[$$0] = 1; nonempty = 1; } \ 134 | END { if (nonempty) { for (i in items) print i; }; } \ 135 | ' 136 | # Make sure the list of sources is unique. This is necessary because, 137 | # e.g., the same source file might be shared among _SOURCES variables 138 | # for different programs/libraries. 139 | am__define_uniq_tagged_files = \ 140 | list='$(am__tagged_files)'; \ 141 | unique=`for i in $$list; do \ 142 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 143 | done | $(am__uniquify_input)` 144 | ETAGS = etags 145 | CTAGS = ctags 146 | CSCOPE = cscope 147 | DIST_SUBDIRS = $(SUBDIRS) 148 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 149 | distdir = $(PACKAGE)-$(VERSION) 150 | top_distdir = $(distdir) 151 | am__remove_distdir = \ 152 | if test -d "$(distdir)"; then \ 153 | find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ 154 | && rm -rf "$(distdir)" \ 155 | || { sleep 5 && rm -rf "$(distdir)"; }; \ 156 | else :; fi 157 | am__post_remove_distdir = $(am__remove_distdir) 158 | am__relativize = \ 159 | dir0=`pwd`; \ 160 | sed_first='s,^\([^/]*\)/.*$$,\1,'; \ 161 | sed_rest='s,^[^/]*/*,,'; \ 162 | sed_last='s,^.*/\([^/]*\)$$,\1,'; \ 163 | sed_butlast='s,/*[^/]*$$,,'; \ 164 | while test -n "$$dir1"; do \ 165 | first=`echo "$$dir1" | sed -e "$$sed_first"`; \ 166 | if test "$$first" != "."; then \ 167 | if test "$$first" = ".."; then \ 168 | dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ 169 | dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ 170 | else \ 171 | first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ 172 | if test "$$first2" = "$$first"; then \ 173 | dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ 174 | else \ 175 | dir2="../$$dir2"; \ 176 | fi; \ 177 | dir0="$$dir0"/"$$first"; \ 178 | fi; \ 179 | fi; \ 180 | dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ 181 | done; \ 182 | reldir="$$dir2" 183 | DIST_ARCHIVES = $(distdir).tar.gz 184 | GZIP_ENV = --best 185 | DIST_TARGETS = dist-gzip 186 | distuninstallcheck_listfiles = find . -type f -print 187 | am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ 188 | | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' 189 | distcleancheck_listfiles = find . -type f -print 190 | ACLOCAL = @ACLOCAL@ 191 | AMTAR = @AMTAR@ 192 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 193 | AUTOCONF = @AUTOCONF@ 194 | AUTOHEADER = @AUTOHEADER@ 195 | AUTOMAKE = @AUTOMAKE@ 196 | AWK = @AWK@ 197 | CC = @CC@ 198 | CCDEPMODE = @CCDEPMODE@ 199 | CFLAGS = @CFLAGS@ 200 | CPPFLAGS = @CPPFLAGS@ 201 | CYGPATH_W = @CYGPATH_W@ 202 | DEFS = @DEFS@ 203 | DEPDIR = @DEPDIR@ 204 | ECHO_C = @ECHO_C@ 205 | ECHO_N = @ECHO_N@ 206 | ECHO_T = @ECHO_T@ 207 | EXEEXT = @EXEEXT@ 208 | INSTALL = @INSTALL@ 209 | INSTALL_DATA = @INSTALL_DATA@ 210 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 211 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 212 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 213 | LDFLAGS = @LDFLAGS@ 214 | LIBOBJS = @LIBOBJS@ 215 | LIBS = @LIBS@ 216 | LTLIBOBJS = @LTLIBOBJS@ 217 | MAKEINFO = @MAKEINFO@ 218 | MKDIR_P = @MKDIR_P@ 219 | OBJEXT = @OBJEXT@ 220 | PACKAGE = @PACKAGE@ 221 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 222 | PACKAGE_NAME = @PACKAGE_NAME@ 223 | PACKAGE_STRING = @PACKAGE_STRING@ 224 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 225 | PACKAGE_URL = @PACKAGE_URL@ 226 | PACKAGE_VERSION = @PACKAGE_VERSION@ 227 | PATH_SEPARATOR = @PATH_SEPARATOR@ 228 | RANLIB = @RANLIB@ 229 | SET_MAKE = @SET_MAKE@ 230 | SHELL = @SHELL@ 231 | STRIP = @STRIP@ 232 | VERSION = @VERSION@ 233 | abs_builddir = @abs_builddir@ 234 | abs_srcdir = @abs_srcdir@ 235 | abs_top_builddir = @abs_top_builddir@ 236 | abs_top_srcdir = @abs_top_srcdir@ 237 | ac_ct_CC = @ac_ct_CC@ 238 | am__include = @am__include@ 239 | am__leading_dot = @am__leading_dot@ 240 | am__quote = @am__quote@ 241 | am__tar = @am__tar@ 242 | am__untar = @am__untar@ 243 | bindir = @bindir@ 244 | build_alias = @build_alias@ 245 | builddir = @builddir@ 246 | datadir = @datadir@ 247 | datarootdir = @datarootdir@ 248 | docdir = @docdir@ 249 | dvidir = @dvidir@ 250 | exec_prefix = @exec_prefix@ 251 | host_alias = @host_alias@ 252 | htmldir = @htmldir@ 253 | includedir = @includedir@ 254 | infodir = @infodir@ 255 | install_sh = @install_sh@ 256 | libdir = @libdir@ 257 | libexecdir = @libexecdir@ 258 | localedir = @localedir@ 259 | localstatedir = @localstatedir@ 260 | mandir = @mandir@ 261 | mkdir_p = @mkdir_p@ 262 | oldincludedir = @oldincludedir@ 263 | pdfdir = @pdfdir@ 264 | prefix = @prefix@ 265 | program_transform_name = @program_transform_name@ 266 | psdir = @psdir@ 267 | sbindir = @sbindir@ 268 | sharedstatedir = @sharedstatedir@ 269 | srcdir = @srcdir@ 270 | sysconfdir = @sysconfdir@ 271 | target_alias = @target_alias@ 272 | top_build_prefix = @top_build_prefix@ 273 | top_builddir = @top_builddir@ 274 | top_srcdir = @top_srcdir@ 275 | SUBDIRS = src test 276 | all: all-recursive 277 | 278 | .SUFFIXES: 279 | am--refresh: Makefile 280 | @: 281 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 282 | @for dep in $?; do \ 283 | case '$(am__configure_deps)' in \ 284 | *$$dep*) \ 285 | echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ 286 | $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ 287 | && exit 0; \ 288 | exit 1;; \ 289 | esac; \ 290 | done; \ 291 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ 292 | $(am__cd) $(top_srcdir) && \ 293 | $(AUTOMAKE) --gnu Makefile 294 | .PRECIOUS: Makefile 295 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 296 | @case '$?' in \ 297 | *config.status*) \ 298 | echo ' $(SHELL) ./config.status'; \ 299 | $(SHELL) ./config.status;; \ 300 | *) \ 301 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ 302 | cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ 303 | esac; 304 | 305 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 306 | $(SHELL) ./config.status --recheck 307 | 308 | $(top_srcdir)/configure: $(am__configure_deps) 309 | $(am__cd) $(srcdir) && $(AUTOCONF) 310 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 311 | $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) 312 | $(am__aclocal_m4_deps): 313 | 314 | # This directory's subdirectories are mostly independent; you can cd 315 | # into them and run 'make' without going through this Makefile. 316 | # To change the values of 'make' variables: instead of editing Makefiles, 317 | # (1) if the variable is set in 'config.status', edit 'config.status' 318 | # (which will cause the Makefiles to be regenerated when you run 'make'); 319 | # (2) otherwise, pass the desired values on the 'make' command line. 320 | $(am__recursive_targets): 321 | @fail=; \ 322 | if $(am__make_keepgoing); then \ 323 | failcom='fail=yes'; \ 324 | else \ 325 | failcom='exit 1'; \ 326 | fi; \ 327 | dot_seen=no; \ 328 | target=`echo $@ | sed s/-recursive//`; \ 329 | case "$@" in \ 330 | distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ 331 | *) list='$(SUBDIRS)' ;; \ 332 | esac; \ 333 | for subdir in $$list; do \ 334 | echo "Making $$target in $$subdir"; \ 335 | if test "$$subdir" = "."; then \ 336 | dot_seen=yes; \ 337 | local_target="$$target-am"; \ 338 | else \ 339 | local_target="$$target"; \ 340 | fi; \ 341 | ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ 342 | || eval $$failcom; \ 343 | done; \ 344 | if test "$$dot_seen" = "no"; then \ 345 | $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ 346 | fi; test -z "$$fail" 347 | 348 | ID: $(am__tagged_files) 349 | $(am__define_uniq_tagged_files); mkid -fID $$unique 350 | tags: tags-recursive 351 | TAGS: tags 352 | 353 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 354 | set x; \ 355 | here=`pwd`; \ 356 | if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ 357 | include_option=--etags-include; \ 358 | empty_fix=.; \ 359 | else \ 360 | include_option=--include; \ 361 | empty_fix=; \ 362 | fi; \ 363 | list='$(SUBDIRS)'; for subdir in $$list; do \ 364 | if test "$$subdir" = .; then :; else \ 365 | test ! -f $$subdir/TAGS || \ 366 | set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ 367 | fi; \ 368 | done; \ 369 | $(am__define_uniq_tagged_files); \ 370 | shift; \ 371 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 372 | test -n "$$unique" || unique=$$empty_fix; \ 373 | if test $$# -gt 0; then \ 374 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 375 | "$$@" $$unique; \ 376 | else \ 377 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 378 | $$unique; \ 379 | fi; \ 380 | fi 381 | ctags: ctags-recursive 382 | 383 | CTAGS: ctags 384 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 385 | $(am__define_uniq_tagged_files); \ 386 | test -z "$(CTAGS_ARGS)$$unique" \ 387 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 388 | $$unique 389 | 390 | GTAGS: 391 | here=`$(am__cd) $(top_builddir) && pwd` \ 392 | && $(am__cd) $(top_srcdir) \ 393 | && gtags -i $(GTAGS_ARGS) "$$here" 394 | cscope: cscope.files 395 | test ! -s cscope.files \ 396 | || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) 397 | clean-cscope: 398 | -rm -f cscope.files 399 | cscope.files: clean-cscope cscopelist 400 | cscopelist: cscopelist-recursive 401 | 402 | cscopelist-am: $(am__tagged_files) 403 | list='$(am__tagged_files)'; \ 404 | case "$(srcdir)" in \ 405 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 406 | *) sdir=$(subdir)/$(srcdir) ;; \ 407 | esac; \ 408 | for i in $$list; do \ 409 | if test -f "$$i"; then \ 410 | echo "$(subdir)/$$i"; \ 411 | else \ 412 | echo "$$sdir/$$i"; \ 413 | fi; \ 414 | done >> $(top_builddir)/cscope.files 415 | 416 | distclean-tags: 417 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 418 | -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 419 | 420 | distdir: $(DISTFILES) 421 | $(am__remove_distdir) 422 | test -d "$(distdir)" || mkdir "$(distdir)" 423 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 424 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 425 | list='$(DISTFILES)'; \ 426 | dist_files=`for file in $$list; do echo $$file; done | \ 427 | sed -e "s|^$$srcdirstrip/||;t" \ 428 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 429 | case $$dist_files in \ 430 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 431 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 432 | sort -u` ;; \ 433 | esac; \ 434 | for file in $$dist_files; do \ 435 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 436 | if test -d $$d/$$file; then \ 437 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 438 | if test -d "$(distdir)/$$file"; then \ 439 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 440 | fi; \ 441 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 442 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 443 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 444 | fi; \ 445 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 446 | else \ 447 | test -f "$(distdir)/$$file" \ 448 | || cp -p $$d/$$file "$(distdir)/$$file" \ 449 | || exit 1; \ 450 | fi; \ 451 | done 452 | @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ 453 | if test "$$subdir" = .; then :; else \ 454 | $(am__make_dryrun) \ 455 | || test -d "$(distdir)/$$subdir" \ 456 | || $(MKDIR_P) "$(distdir)/$$subdir" \ 457 | || exit 1; \ 458 | dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ 459 | $(am__relativize); \ 460 | new_distdir=$$reldir; \ 461 | dir1=$$subdir; dir2="$(top_distdir)"; \ 462 | $(am__relativize); \ 463 | new_top_distdir=$$reldir; \ 464 | echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ 465 | echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ 466 | ($(am__cd) $$subdir && \ 467 | $(MAKE) $(AM_MAKEFLAGS) \ 468 | top_distdir="$$new_top_distdir" \ 469 | distdir="$$new_distdir" \ 470 | am__remove_distdir=: \ 471 | am__skip_length_check=: \ 472 | am__skip_mode_fix=: \ 473 | distdir) \ 474 | || exit 1; \ 475 | fi; \ 476 | done 477 | -test -n "$(am__skip_mode_fix)" \ 478 | || find "$(distdir)" -type d ! -perm -755 \ 479 | -exec chmod u+rwx,go+rx {} \; -o \ 480 | ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ 481 | ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ 482 | ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ 483 | || chmod -R a+r "$(distdir)" 484 | dist-gzip: distdir 485 | tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz 486 | $(am__post_remove_distdir) 487 | 488 | dist-bzip2: distdir 489 | tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 490 | $(am__post_remove_distdir) 491 | 492 | dist-lzip: distdir 493 | tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz 494 | $(am__post_remove_distdir) 495 | 496 | dist-xz: distdir 497 | tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz 498 | $(am__post_remove_distdir) 499 | 500 | dist-tarZ: distdir 501 | @echo WARNING: "Support for shar distribution archives is" \ 502 | "deprecated." >&2 503 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 504 | tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z 505 | $(am__post_remove_distdir) 506 | 507 | dist-shar: distdir 508 | @echo WARNING: "Support for distribution archives compressed with" \ 509 | "legacy program 'compress' is deprecated." >&2 510 | @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 511 | shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz 512 | $(am__post_remove_distdir) 513 | 514 | dist-zip: distdir 515 | -rm -f $(distdir).zip 516 | zip -rq $(distdir).zip $(distdir) 517 | $(am__post_remove_distdir) 518 | 519 | dist dist-all: 520 | $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' 521 | $(am__post_remove_distdir) 522 | 523 | # This target untars the dist file and tries a VPATH configuration. Then 524 | # it guarantees that the distribution is self-contained by making another 525 | # tarfile. 526 | distcheck: dist 527 | case '$(DIST_ARCHIVES)' in \ 528 | *.tar.gz*) \ 529 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ 530 | *.tar.bz2*) \ 531 | bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ 532 | *.tar.lz*) \ 533 | lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ 534 | *.tar.xz*) \ 535 | xz -dc $(distdir).tar.xz | $(am__untar) ;;\ 536 | *.tar.Z*) \ 537 | uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ 538 | *.shar.gz*) \ 539 | GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ 540 | *.zip*) \ 541 | unzip $(distdir).zip ;;\ 542 | esac 543 | chmod -R a-w $(distdir) 544 | chmod u+w $(distdir) 545 | mkdir $(distdir)/_build $(distdir)/_inst 546 | chmod a-w $(distdir) 547 | test -d $(distdir)/_build || exit 0; \ 548 | dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ 549 | && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ 550 | && am__cwd=`pwd` \ 551 | && $(am__cd) $(distdir)/_build \ 552 | && ../configure \ 553 | $(AM_DISTCHECK_CONFIGURE_FLAGS) \ 554 | $(DISTCHECK_CONFIGURE_FLAGS) \ 555 | --srcdir=.. --prefix="$$dc_install_base" \ 556 | && $(MAKE) $(AM_MAKEFLAGS) \ 557 | && $(MAKE) $(AM_MAKEFLAGS) dvi \ 558 | && $(MAKE) $(AM_MAKEFLAGS) check \ 559 | && $(MAKE) $(AM_MAKEFLAGS) install \ 560 | && $(MAKE) $(AM_MAKEFLAGS) installcheck \ 561 | && $(MAKE) $(AM_MAKEFLAGS) uninstall \ 562 | && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ 563 | distuninstallcheck \ 564 | && chmod -R a-w "$$dc_install_base" \ 565 | && ({ \ 566 | (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ 567 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ 568 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ 569 | && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ 570 | distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ 571 | } || { rm -rf "$$dc_destdir"; exit 1; }) \ 572 | && rm -rf "$$dc_destdir" \ 573 | && $(MAKE) $(AM_MAKEFLAGS) dist \ 574 | && rm -rf $(DIST_ARCHIVES) \ 575 | && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ 576 | && cd "$$am__cwd" \ 577 | || exit 1 578 | $(am__post_remove_distdir) 579 | @(echo "$(distdir) archives ready for distribution: "; \ 580 | list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ 581 | sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' 582 | distuninstallcheck: 583 | @test -n '$(distuninstallcheck_dir)' || { \ 584 | echo 'ERROR: trying to run $@ with an empty' \ 585 | '$$(distuninstallcheck_dir)' >&2; \ 586 | exit 1; \ 587 | }; \ 588 | $(am__cd) '$(distuninstallcheck_dir)' || { \ 589 | echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ 590 | exit 1; \ 591 | }; \ 592 | test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ 593 | || { echo "ERROR: files left after uninstall:" ; \ 594 | if test -n "$(DESTDIR)"; then \ 595 | echo " (check DESTDIR support)"; \ 596 | fi ; \ 597 | $(distuninstallcheck_listfiles) ; \ 598 | exit 1; } >&2 599 | distcleancheck: distclean 600 | @if test '$(srcdir)' = . ; then \ 601 | echo "ERROR: distcleancheck can only run from a VPATH build" ; \ 602 | exit 1 ; \ 603 | fi 604 | @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ 605 | || { echo "ERROR: files left in build directory after distclean:" ; \ 606 | $(distcleancheck_listfiles) ; \ 607 | exit 1; } >&2 608 | check-am: all-am 609 | check: check-recursive 610 | all-am: Makefile 611 | installdirs: installdirs-recursive 612 | installdirs-am: 613 | install: install-recursive 614 | install-exec: install-exec-recursive 615 | install-data: install-data-recursive 616 | uninstall: uninstall-recursive 617 | 618 | install-am: all-am 619 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 620 | 621 | installcheck: installcheck-recursive 622 | install-strip: 623 | if test -z '$(STRIP)'; then \ 624 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 625 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 626 | install; \ 627 | else \ 628 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 629 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 630 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 631 | fi 632 | mostlyclean-generic: 633 | 634 | clean-generic: 635 | 636 | distclean-generic: 637 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 638 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 639 | 640 | maintainer-clean-generic: 641 | @echo "This command is intended for maintainers to use" 642 | @echo "it deletes files that may require special tools to rebuild." 643 | clean: clean-recursive 644 | 645 | clean-am: clean-generic mostlyclean-am 646 | 647 | distclean: distclean-recursive 648 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 649 | -rm -f Makefile 650 | distclean-am: clean-am distclean-generic distclean-tags 651 | 652 | dvi: dvi-recursive 653 | 654 | dvi-am: 655 | 656 | html: html-recursive 657 | 658 | html-am: 659 | 660 | info: info-recursive 661 | 662 | info-am: 663 | 664 | install-data-am: 665 | 666 | install-dvi: install-dvi-recursive 667 | 668 | install-dvi-am: 669 | 670 | install-exec-am: 671 | 672 | install-html: install-html-recursive 673 | 674 | install-html-am: 675 | 676 | install-info: install-info-recursive 677 | 678 | install-info-am: 679 | 680 | install-man: 681 | 682 | install-pdf: install-pdf-recursive 683 | 684 | install-pdf-am: 685 | 686 | install-ps: install-ps-recursive 687 | 688 | install-ps-am: 689 | 690 | installcheck-am: 691 | 692 | maintainer-clean: maintainer-clean-recursive 693 | -rm -f $(am__CONFIG_DISTCLEAN_FILES) 694 | -rm -rf $(top_srcdir)/autom4te.cache 695 | -rm -f Makefile 696 | maintainer-clean-am: distclean-am maintainer-clean-generic 697 | 698 | mostlyclean: mostlyclean-recursive 699 | 700 | mostlyclean-am: mostlyclean-generic 701 | 702 | pdf: pdf-recursive 703 | 704 | pdf-am: 705 | 706 | ps: ps-recursive 707 | 708 | ps-am: 709 | 710 | uninstall-am: 711 | 712 | .MAKE: $(am__recursive_targets) install-am install-strip 713 | 714 | .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ 715 | am--refresh check check-am clean clean-cscope clean-generic \ 716 | cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ 717 | dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ 718 | distcheck distclean distclean-generic distclean-tags \ 719 | distcleancheck distdir distuninstallcheck dvi dvi-am html \ 720 | html-am info info-am install install-am install-data \ 721 | install-data-am install-dvi install-dvi-am install-exec \ 722 | install-exec-am install-html install-html-am install-info \ 723 | install-info-am install-man install-pdf install-pdf-am \ 724 | install-ps install-ps-am install-strip installcheck \ 725 | installcheck-am installdirs installdirs-am maintainer-clean \ 726 | maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ 727 | pdf-am ps ps-am tags tags-am uninstall uninstall-am 728 | 729 | 730 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 731 | # Otherwise a system limit (for SysV at least) may be exceeded. 732 | .NOEXPORT: 733 | -------------------------------------------------------------------------------- /extenal/shmdb/NEWS: -------------------------------------------------------------------------------- 1 | v0.1 2 | Use automake to create binaray. -------------------------------------------------------------------------------- /extenal/shmdb/README: -------------------------------------------------------------------------------- 1 | # shmdb 2 | A memory database based on shared memory. 3 | 4 | ## 1. can do 5 | shmdb shared memory multi-process aimed at resolving the problem. Under linux or windows, operating system provides a shared memory feature, you can apply for a memory area by calling the system function, shmdb is the use of this feature of the operating system, the framework of a key-value type of database. When used to set up a pair of key-value through the function `shmdb_put`, also to get a pair of key-value through the function `shmdb_get`. 6 | 7 | ## 2. can not do 8 | shmdb does not provide network access functions can only be embedded into applications to run. It is not suitable for network databases. 9 | 10 | ## 3.API 11 | 12 | ### 3.1 shmdb_initParent parent process initializes 13 | 14 | int shmdb_initParent (STHashShareHandle * handle, unsigned int size) 15 | 16 | **Parameters** 17 | 18 | - [In | out] `STHashShareHandle * handle` `shmid`,which is the member variable of `handle` will ben initialize in this function 19 | - `unsigned int size` specified base area 20 | 21 | **The return value** 22 | 23 | - int result of the operation 24 | 25 | ### 3.2 shmdb_initChild child process initialization 26 | 27 | int shmdb_initChild (STHashShareHandle * handle) 28 | **Parameters** 29 |     30 | - [In] `STHashShareHandle * handle` internal memory function to mount its own memory area based to the shared memory via the `handle`'s `shmid` 31 |   32 | **The return value** 33 | 34 | - `int` result of the operation 35 | 36 | ### 3.3 shmdb_put write value 37 | 38 | int shmdb_put (STHashShareHandle * handle, const char * key, unsigned short keyLen, 39 | const char * value, unsigned short valueLen) 40 | 41 | **Parameters** 42 | 43 | 44 | - [In] `STHashShareHandle * handle` internal function to read the value of handle's shmid to manipulate shared memory 45 | - [In] `const char * key` 46 | - `unsigned short keyLen` 47 | - [In] `const char * value` 48 | - `unsigned short valueLen` 49 | 50 | 51 | **The return value** 52 | 53 | - `int` result of the operation 54 | 55 | ### 3.4 shmdb_get get the value 56 | 57 | shmdb_get (STHashShareHandle * handle, const char * key, unsigned short keyLen, 58 | char ** value, unsigned short * valueLen) 59 | 60 | **Parameters** 61 | 62 | - [In] `STHashShareHandle * handle` internal function to read the value of handle's shmid to manipulate shared memory 63 | - [In] `const char * key` 64 | - `unsigned short keyLen` 65 | - [Out] `char ** value` internal function allocate the memory space of `value`, manually call the `free` function after this call is completed. If `valueLen` value is NULL, the function does not allocate the space of `value`. 66 | - `unsigned short * valueLen ` 67 | 68 | **The return value** 69 | 70 | - `int` result of the operation 71 | 72 | ### 3.5 shmdb_delete delete values 73 | 74 | int shmdb_delete (STHashShareHandle * handle, const char * key, unsigned short keyLen, 75 | char ** value, unsigned short * valueLen) 76 | 77 | **Parameters** 78 | 79 | - [In] `STHashShareHandle * handle` internal function to read the value of handle's shmid to manipulate shared memory 80 | - [In] `const char * key` 81 | - `unsigned short keyLen` 82 | - [Out] `char ** value` internal function allocate the memory space of `value`, manually call the `free` function after this call is completed. If `valueLen` value is NULL, the function does not allocate the space of `value`. 83 | - `unsigned short * valueLen` 84 | 85 | **The return value** 86 | 87 | - `int` result of the operation 88 | ### 3.6 shmdb_destroy destruction 89 | > When the program exits normally, you should call this function manually to remove the shared memory from the operating system. 90 | 91 | int shmdb_destroy (STHashShareHandle * handle) 92 | 93 | **Parameters** 94 | 95 | - [In] `STHashShareHandle * handle` internal function to read the value of handle's shmid to manipulate shared memory 96 | 97 | 98 | **The return value** 99 | 100 | - `int` result of the operation 101 | 102 | ## Contributors 103 | [yunnysunny](https://github.com/yunnysunny) (maintainer) 104 | 105 | **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) -------------------------------------------------------------------------------- /extenal/shmdb/autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This shell script runs Autotools to generate the build environment 3 | 4 | # creates the local environment, sets up m4 macros 5 | aclocal 6 | 7 | # enables libtool in automake 8 | libtoolize --automake 9 | 10 | # creates some files that --add-missing can't, but are required to create 11 | # the Makefile.in 12 | #touch NEWS README AUTHORS ChangeLog 13 | 14 | # turns Makefile.am into Makefile.in 15 | automake --add-missing 16 | 17 | # turns configure.ac into the pure shell configure 18 | autoconf 19 | -------------------------------------------------------------------------------- /extenal/shmdb/configure.ac: -------------------------------------------------------------------------------- 1 | dnl Process this file with autoconf to produce a configure script 2 | AC_PREREQ(2.53) 3 | AC_INIT(test) 4 | AM_INIT_AUTOMAKE(appexp, 0.1.00) 5 | AC_PROG_CC 6 | AC_PROG_RANLIB 7 | AC_OUTPUT(src/Makefile test/Makefile Makefile) 8 | 9 | -------------------------------------------------------------------------------- /extenal/shmdb/include/errcode.h: -------------------------------------------------------------------------------- 1 | #ifndef _ERRCODE_H 2 | #define _ERRCODE_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | //#define ERROR_SUCCESS 0 9 | #define ERROR_SHM_BASE 0x10000000 10 | #define ERROR_TOO_BIG_SIZE (ERROR_SHM_BASE + 1) 11 | #define ERROR_GET_SHM_FAILED (ERROR_SHM_BASE + 2) 12 | #define ERROR_SHM_NOT_INIT (ERROR_SHM_BASE + 3) 13 | #define ERROR_NULL_KEY (ERROR_SHM_BASE + 4) 14 | #define ERROR_NULL_VALUE (ERROR_SHM_BASE + 5) 15 | #define ERROR_GET_LOCK (ERROR_SHM_BASE + 6) 16 | #define ERROR_FULL_USED (ERROR_SHM_BASE + 7) 17 | #define ERROR_TOO_LONG_KEY (ERROR_SHM_BASE + 8) 18 | #define ERROR_TOO_LONG_VALUE (ERROR_SHM_BASE + 9) 19 | #define ERROR_NOT_ENOUGH (ERROR_SHM_BASE + 10) 20 | #define ERROR_GET_INDEX (ERROR_SHM_BASE + 11) 21 | 22 | #define ERROR_MALLOC_MEMORY (ERROR_SHM_BASE + 12) 23 | #define ERROR_NULL_MEMDATA (ERROR_SHM_BASE + 13) 24 | #define ERROR_NOT_FOUND_INDEX (ERROR_SHM_BASE + 14) 25 | 26 | #define ERROR_PATH_NULL (ERROR_SHM_BASE + 15) 27 | #define ERROR_FOPEN_ERROR (ERROR_SHM_BASE + 16) 28 | 29 | #define ERROR_DESTORY_SHM (ERROR_SHM_BASE + 17) 30 | #ifdef __cplusplus 31 | } 32 | #endif 33 | 34 | #endif -------------------------------------------------------------------------------- /extenal/shmdb/include/hash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * File: hash.h 3 | * Author: sunny 4 | * 5 | * Created on 2014年3月30日, 上午10:16 6 | */ 7 | 8 | #ifndef HASH_H 9 | #define HASH_H 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | unsigned int getHashNum(const char *str,unsigned int len,unsigned int maxPrime); 16 | 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* HASH_H */ 23 | 24 | -------------------------------------------------------------------------------- /extenal/shmdb/include/log.h: -------------------------------------------------------------------------------- 1 | /** 2 | Open Source Initiative OSI - The MIT License (MIT):Licensing 3 | 4 | The MIT License (MIT) 5 | Copyright (c) <2012> 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 8 | and associated documentation files (the "Software"), to deal in the Software without restriction, 9 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all copies or substantial 14 | portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 17 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 18 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @author yunnysunny 24 | 25 | */ 26 | #ifndef LOG_H_ 27 | #define LOG_H_ 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | #define LEVEL_NONE 0 // 34 | #define LEVEL_FAULT 1 // 35 | #define LEVEL_ERROR 2 // 36 | #define LEVEL_WARN 3 // 37 | #define LEVEL_INFO 4 // 38 | #define LEVEL_DEBUG 5 // 39 | #define LEVEL_TRACE 6 // 40 | 41 | #define DEFAULT_LOG_MODULE "logger" 42 | 43 | void setLogLevel(int nLogLevel); 44 | 45 | void setLogFile(const char *fileName); 46 | 47 | void printLog(char* sModule, int nLogLevel, char *sFile,int nLine,char *fmt, ...); 48 | 49 | int errorReturn(int errorCode,char *tag,char *msg); 50 | 51 | #define LOG(lvl, rv, msg) printLog(DEFAULT_LOG_MODULE, lvl, __FILE__, __LINE__,"[%08x][%s]", rv, msg); 52 | 53 | #define LOG_WITH_TAG(lvl, tag, rv, msg) printLog( tag,lvl, __FILE__, __LINE__, "[%08x][%s]", rv,msg) 54 | 55 | #if defined(WIN32) || defined(WIN64) || defined(_WIN32) || defined(_WIN64) 56 | #ifndef _MSC_VER 57 | #define _MSC_VER 1600 58 | #endif 59 | #define SIM_TRACE(format,...) printLog(DEFAULT_LOG_MODULE, LEVEL_TRACE, __FILE__, __LINE__,format,##__VA_ARGS__) 60 | #define SIM_DEBUG(format,...) printLog(DEFAULT_LOG_MODULE, LEVEL_DEBUG, __FILE__, __LINE__,format,##__VA_ARGS__) 61 | #define SIM_INFO(format,...) printLog(DEFAULT_LOG_MODULE, LEVEL_INFO, __FILE__, __LINE__,format,##__VA_ARGS__) 62 | #define SIM_WARN(format,...) printLog(DEFAULT_LOG_MODULE, LEVEL_WARN, __FILE__, __LINE__,format,##__VA_ARGS__) 63 | #define SIM_ERROR(format,...) printLog(DEFAULT_LOG_MODULE, LEVEL_ERROR, __FILE__, __LINE__,format,##__VA_ARGS__) 64 | #define SIM_FAULT(format,...) printLog(DEFAULT_LOG_MODULE, LEVEL_FAULT, __FILE__, __LINE__,format,##__VA_ARGS__) 65 | #else 66 | #define SIM_TRACE(format,args...) printLog(DEFAULT_LOG_MODULE, LEVEL_TRACE, __FILE__, __LINE__,format,##args) 67 | #define SIM_DEBUG(format,args...) printLog(DEFAULT_LOG_MODULE, LEVEL_DEBUG, __FILE__, __LINE__,format,##args) 68 | #define SIM_INFO(format,args...) printLog(DEFAULT_LOG_MODULE, LEVEL_INFO, __FILE__, __LINE__,format,##args) 69 | #define SIM_WARN(format,args...) printLog(DEFAULT_LOG_MODULE, LEVEL_WARN, __FILE__, __LINE__,format,##args) 70 | #define SIM_ERROR(format,args...) printLog(DEFAULT_LOG_MODULE, LEVEL_ERROR, __FILE__, __LINE__,format,##args) 71 | #define SIM_FAULT(format,args...) printLog(DEFAULT_LOG_MODULE, LEVEL_FAULT, __FILE__, __LINE__,format,##args) 72 | #endif 73 | 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | 78 | #endif /*#ifndef LOG_H_*/ 79 | -------------------------------------------------------------------------------- /extenal/shmdb/include/mm.h: -------------------------------------------------------------------------------- 1 | #ifndef _shmdb_H 2 | #define _shmdb_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "platform.h" 9 | 10 | #if __IS_WIN__ 11 | #include 12 | #endif 13 | 14 | 15 | /** 16 | * the index area of the hashmap.it contains the value cacluated from 17 | * the result of hash arithmetic,whose input is the sum of the key string. 18 | * |status|dataOffset|nextIndex| 19 | */ 20 | typedef struct MemIndex { 21 | //unsigned int keyMapIndex; 22 | /** the offset of the value in the memery */ 23 | unsigned int dataOffset; 24 | /** 25 | * when the key cacluated with same index,it will be save in zipper area. 26 | * And the nextIndex is the index of the zipper area. 27 | */ 28 | unsigned int nextIndex; 29 | /** 30 | * the status of the current memery index. 31 | */ 32 | unsigned char status;//0:normal,1:deleted 33 | }STMemIndex; 34 | /** 35 | * the value area of the hashmap. 36 | * |indexValue|keyLen|key|valueLen|value| 37 | */ 38 | typedef struct MemData { 39 | /** which indicate the index of STMemIndex */ 40 | unsigned int indexValue; 41 | unsigned short valueLen; 42 | unsigned short keyLen; 43 | char *key; 44 | char *value; 45 | }STMemData; 46 | /** 47 | * the head of the hashmap. 48 | * the hashmap's index area is divided into two part : 49 | * the base area and the zipper area. 50 | * the value of base area is smaller than baseLen,while 51 | * the value of zipper area is bigger than baseLen. 52 | */ 53 | typedef struct HashShareMemHead { 54 | unsigned int totalLen; 55 | unsigned int baseLen; 56 | /***/ 57 | unsigned int totalUsed; 58 | unsigned int baseUsed; 59 | /** the current offset of MemData which is unused. 60 | the value of it is cacluated form the beginning of the share memory. */ 61 | unsigned int valueOffset; 62 | unsigned int memLen; 63 | }STHashShareMemHead; 64 | 65 | 66 | typedef struct ShmdbOption { 67 | int logLevel; 68 | }STShmdbOption; 69 | 70 | #if __IS_WIN__ 71 | //#define fopen fopen_s 72 | #else 73 | typedef int HANDLE; 74 | typedef void *LPVOID; 75 | #define GetLastError() (errno) 76 | #endif 77 | 78 | typedef struct HashShareHandle { 79 | HANDLE shmid;/*share memory handel*/ 80 | HANDLE semid;/*semaphore handel*/ 81 | LPVOID shmaddr;/*share memory attach to current process*/ 82 | }STHashShareHandle; 83 | 84 | 85 | #define INT_LENGTH (sizeof(int)) 86 | #define CHAR_LENGTH (sizeof(char)) 87 | #define SHORT_LENGTH (sizeof(short)) 88 | #define STATUS_UNSED 0 89 | #define STATUS_DEL 1 90 | #define STATUS_INUSED 0xff 91 | 92 | 93 | #define SIZE_OF_ST_MEM_INDEX (INT_LENGTH * 2 + CHAR_LENGTH) 94 | #define BASE_SIZE_OF_ST_MEM_DATA (INT_LENGTH + SHORT_LENGTH * 2) 95 | #define MAX_LEN_OF_KEY 0xff 96 | #define MAX_LEN_OF_ELEMENT (0x400 * 4)//4KB 97 | #define MAX_LEN_OF_VALUE (MAX_LEN_OF_ELEMENT - MAX_LEN_OF_KEY - BASE_SIZE_OF_ST_MEM_DATA) 98 | #define SIZE_OF_ST_HASH_SHARE_MEM_HEAD (INT_LENGTH * 6) 99 | 100 | #if __IS_WIN__ 101 | #define MAX_WAIT_WHEN_GET_LOCAK 100 102 | #else 103 | #define MAX_WAIT_WHEN_GET_LOCAK 100*1000*1000 104 | #endif 105 | 106 | 107 | int shmdb_initParent(STHashShareHandle *handle,unsigned int size,STShmdbOption *option); 108 | 109 | int shmdb_initChild(STHashShareHandle *handle); 110 | 111 | int shmdb_getInfo(STHashShareHandle *handle, STHashShareMemHead *head); 112 | 113 | int shmdb_put(STHashShareHandle *handle,const char*key,unsigned short keyLen, 114 | const char *value,unsigned short valueLen); 115 | 116 | int shmdb_get(STHashShareHandle *handle,const char*key,unsigned short keyLen, 117 | char **value,unsigned short *valueLen); 118 | 119 | int shmdb_delete(STHashShareHandle *handle,const char *key,unsigned short keyLen, 120 | char **value,unsigned short *valueLen); 121 | 122 | int shmdb_dump(STHashShareHandle *handle,char *path); 123 | 124 | int shmdb_destroy(STHashShareHandle *handle); 125 | 126 | #ifdef __cplusplus 127 | } 128 | #endif 129 | 130 | #endif -------------------------------------------------------------------------------- /extenal/shmdb/include/platform.h: -------------------------------------------------------------------------------- 1 | #ifndef _PLATFORM_H 2 | #define _PLATFORM_H 3 | 4 | #if defined(WIN32) || defined(WIN64) || defined(_WIN32) || defined(_WIN64) 5 | #define __IS_WIN__ 1 6 | #else 7 | #define __IS_WIN__ 0 8 | #endif 9 | 10 | #endif -------------------------------------------------------------------------------- /extenal/shmdb/include/prime.h: -------------------------------------------------------------------------------- 1 | #ifndef _PRIME_H 2 | #define _PRIME_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | unsigned int getMaxPrime(unsigned int num); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | 14 | #endif -------------------------------------------------------------------------------- /extenal/shmdb/include/transform.h: -------------------------------------------------------------------------------- 1 | #ifndef _TRANSFORM_H 2 | #define _TRANSFORM_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | int int2chars(unsigned int num,unsigned char* chars) ; 9 | 10 | int chars2int(unsigned char* chars,unsigned int *num); 11 | 12 | int short2chars(unsigned short num,unsigned char *chars); 13 | 14 | int chars2short(unsigned char *chars,unsigned short *num); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | 20 | #endif -------------------------------------------------------------------------------- /extenal/shmdb/readm-en.md: -------------------------------------------------------------------------------- 1 | # shmdb 2 | A memory database based on shared memory. 3 | 4 | ## 1. can do 5 | shmdb shared memory multi-process aimed at resolving the problem. Under linux or windows, operating system provides a shared memory feature, you can apply for a memory area by calling the system function, shmdb is the use of this feature of the operating system, the framework of a key-value type of database. When used to set up a pair of key-value through the function `shmdb_put`, also to get a pair of key-value through the function `shmdb_get`. 6 | 7 | ## 2. can not do 8 | shmdb does not provide network access functions can only be embedded into applications to run. It is not suitable for network databases. 9 | 10 | ## 3.API 11 | 12 | ### 3.1 shmdb_initParent parent process initializes 13 | 14 | int shmdb_initParent (STHashShareHandle * handle, unsigned int size) 15 | 16 | **Parameters** 17 | 18 | - [In | out] `STHashShareHandle * handle` `shmid`,which is the member variable of `handle` will ben initialize in this function 19 | - `unsigned int size` specified base area 20 | - [In] `STShmdbOption *option` the option of log,can be NULL. 21 | 22 | 23 | **The return value** 24 | 25 | - int result of the operation 26 | 27 | ### 3.2 shmdb_initChild child process initialization 28 | 29 | int shmdb_initChild (STHashShareHandle * handle) 30 | **Parameters** 31 |     32 | - [In] `STHashShareHandle * handle` internal memory function to mount its own memory area based to the shared memory via the `handle`'s `shmid` 33 |   34 | **The return value** 35 | 36 | - `int` result of the operation 37 | 38 | ### 3.3 shmdb_put write value 39 | 40 | int shmdb_put (STHashShareHandle * handle, const char * key, unsigned short keyLen, 41 | const char * value, unsigned short valueLen) 42 | 43 | **Parameters** 44 | 45 | 46 | - [In] `STHashShareHandle * handle` internal function to read the value of handle's shmid to manipulate shared memory 47 | - [In] `const char * key` 48 | - `unsigned short keyLen` 49 | - [In] `const char * value` 50 | - `unsigned short valueLen` 51 | 52 | 53 | **The return value** 54 | 55 | - `int` result of the operation 56 | 57 | ### 3.4 shmdb_get get the value 58 | 59 | shmdb_get (STHashShareHandle * handle, const char * key, unsigned short keyLen, 60 | char ** value, unsigned short * valueLen) 61 | 62 | **Parameters** 63 | 64 | - [In] `STHashShareHandle * handle` internal function to read the value of handle's shmid to manipulate shared memory 65 | - [In] `const char * key` 66 | - `unsigned short keyLen` 67 | - [Out] `char ** value` internal function allocate the memory space of `value`, manually call the `free` function after this call is completed. If `valueLen` value is NULL, the function does not allocate the space of `value`. 68 | - `unsigned short * valueLen ` 69 | 70 | **The return value** 71 | 72 | - `int` result of the operation 73 | 74 | ### 3.5 shmdb_delete delete values 75 | 76 | int shmdb_delete (STHashShareHandle * handle, const char * key, unsigned short keyLen, 77 | char ** value, unsigned short * valueLen) 78 | 79 | **Parameters** 80 | 81 | - [In] `STHashShareHandle * handle` internal function to read the value of handle's shmid to manipulate shared memory 82 | - [In] `const char * key` 83 | - `unsigned short keyLen` 84 | - [Out] `char ** value` internal function allocate the memory space of `value`, manually call the `free` function after this call is completed. If `valueLen` value is NULL, the function does not allocate the space of `value`. 85 | - `unsigned short * valueLen` 86 | 87 | **The return value** 88 | 89 | - `int` result of the operation 90 | ### 3.6 shmdb_destroy destruction 91 | > When the program exits normally, you should call this function manually to remove the shared memory from the operating system. 92 | 93 | int shmdb_destroy (STHashShareHandle * handle) 94 | 95 | **Parameters** 96 | 97 | - [In] `STHashShareHandle * handle` internal function to read the value of handle's shmid to manipulate shared memory 98 | 99 | 100 | **The return value** 101 | 102 | - `int` result of the operation 103 | 104 | ## Contributors 105 | [yunnysunny](https://github.com/yunnysunny) (maintainer) 106 | 107 | **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) -------------------------------------------------------------------------------- /extenal/shmdb/readme-zh.md: -------------------------------------------------------------------------------- 1 | #shmdb 2 | 基于共享内存的内存数据库 3 | 4 | ## 1.能做什么 5 | shmdb旨在解决多进程的内存共享问题。在linux或者windows下,操作系统提供共享内存的功能,可以通过调用系统函数申请一段内存区域,shmdb就是利用了操作系统的这个特性,构架一个key-value类型的数据库。使用时,通过函数`shmdb_put`来设置一对key-value,同样通过函数`shmdb_get`来获取一对key-value。 6 | 7 | ## 2.不能做什么 8 | shmdb没有提供网络访问功能,仅仅只能嵌入到应用程序中来运行。所以不适合做网络数据库使用。 9 | 10 | ## 3.API 11 | 12 | ### 3.1 shmdb_initParent 初始化父进程 13 | 14 | int shmdb_initParent(STHashShareHandle *handle,unsigned int size) 15 | 16 | **参数** 17 | 18 | - [in|out] STHashShareHandle *handle 函数内部会给handle的shmid成员变量赋值 19 | - unsigned int size 指定base区域的长度 20 | - [in] STShmdbOption *option 日志选项,可以为NULL 21 | 22 | 23 | **返回值** 24 | 25 | - int 操作结果 26 | 27 | ### 3.2 shmdb_initChild 初始化子进程 28 | 29 | int shmdb_initChild(STHashShareHandle *handle) 30 | **参数** 31 | 32 | - [in] STHashShareHandle *handle 函数内部会根据handle的shmid值来将共享内存挂载到自己的内存区域 33 | 34 | **返回值** 35 | 36 | - int 操作结果 37 | 38 | ### 3.3 shmdb_put 写入值 39 | 40 | int shmdb_put(STHashShareHandle *handle,const char*key,unsigned short keyLen, 41 | const char *value,unsigned short valueLen) 42 | 43 | **参数** 44 | 45 | - [in] STHashShareHandle *handle 函数内部读取handle内shmid值来操作共享内存 46 | - [in] const char *key 47 | - unsigned short keyLen 48 | - [in] const char *value 49 | - unsigned short valueLen 50 | 51 | **返回值** 52 | 53 | - int 操作结果 54 | 55 | ### 3.4 shmdb_get 获取值 56 | 57 | shmdb_get(STHashShareHandle *handle,const char*key,unsigned short keyLen, 58 | char **value,unsigned short *valueLen) 59 | 60 | **参数** 61 | 62 | - [in] STHashShareHandle *handle 函数内部读取handle内shmid值来操作共享内存 63 | - [in] const char *key 64 | - unsigned short keyLen 65 | - [out] char **value 函数在内部申请`value`的内存空间,调用完成后要手动调用free释放。如果`valueLen`的值为NULL,则函数内部不会对`value`申请内存。 66 | - unsigned short *valueLen 67 | 68 | **返回值** 69 | 70 | - int 操作结果 71 | 72 | ### 3.5 shmdb_delete 删除值 73 | 74 | int shmdb_delete(STHashShareHandle *handle,const char *key,unsigned short keyLen, 75 | char **value,unsigned short *valueLen) 76 | 77 | **参数** 78 | 79 | - [in] STHashShareHandle *handle 函数内部读取handle内shmid值来操作共享内存 80 | - [in] const char *key 81 | - unsigned short keyLen 82 | - [out] char **value 函数在内部申请得到的内容的内存空间,调用完成后要手动调用free释放。如果`valueLen`的值为NULL,则函数内部不会对`value`申请内存。 83 | - unsigned short *valueLen 84 | 85 | **返回值** 86 | 87 | - int 操作结果 88 | 89 | ### 3.6 shmdb_destroy 销毁 90 | > 在程序正常退出时,应该手动调用该函数将共享内存从操作系统中移除。 91 | 92 | int shmdb_destroy(STHashShareHandle *handle) 93 | 94 | **参数** 95 | 96 | - [in] STHashShareHandle *handle 函数内部读取handle内shmid值来操作共享内存 97 | 98 | 99 | **返回值** 100 | 101 | - int 操作结果 102 | 103 | ## 贡献者 104 | [yunnysunny](https://github.com/yunnysunny) (maintainer) 105 | 106 | **License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) 107 | 108 | 109 | -------------------------------------------------------------------------------- /extenal/shmdb/shmdb.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Express 2012 for Windows Desktop 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "src", "src\src.vcxproj", "{F4316E0C-D450-4E89-AD50-9C204E484531}" 5 | EndProject 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32_test", "win32_test\win32_test.vcxproj", "{5ADAD7E4-373C-471B-BF8C-5FF21BEFDC3D}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "win32_test_sub", "win32_test_sub\win32_test_sub.vcxproj", "{2A328B4C-D9E2-433D-B7C0-FE5DDEA7198F}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Win32 = Debug|Win32 13 | Release|Win32 = Release|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {F4316E0C-D450-4E89-AD50-9C204E484531}.Debug|Win32.ActiveCfg = Debug|Win32 17 | {F4316E0C-D450-4E89-AD50-9C204E484531}.Debug|Win32.Build.0 = Debug|Win32 18 | {F4316E0C-D450-4E89-AD50-9C204E484531}.Release|Win32.ActiveCfg = Release|Win32 19 | {F4316E0C-D450-4E89-AD50-9C204E484531}.Release|Win32.Build.0 = Release|Win32 20 | {5ADAD7E4-373C-471B-BF8C-5FF21BEFDC3D}.Debug|Win32.ActiveCfg = Debug|Win32 21 | {5ADAD7E4-373C-471B-BF8C-5FF21BEFDC3D}.Debug|Win32.Build.0 = Debug|Win32 22 | {5ADAD7E4-373C-471B-BF8C-5FF21BEFDC3D}.Release|Win32.ActiveCfg = Release|Win32 23 | {5ADAD7E4-373C-471B-BF8C-5FF21BEFDC3D}.Release|Win32.Build.0 = Release|Win32 24 | {2A328B4C-D9E2-433D-B7C0-FE5DDEA7198F}.Debug|Win32.ActiveCfg = Debug|Win32 25 | {2A328B4C-D9E2-433D-B7C0-FE5DDEA7198F}.Debug|Win32.Build.0 = Debug|Win32 26 | {2A328B4C-D9E2-433D-B7C0-FE5DDEA7198F}.Release|Win32.ActiveCfg = Release|Win32 27 | {2A328B4C-D9E2-433D-B7C0-FE5DDEA7198F}.Release|Win32.Build.0 = Release|Win32 28 | EndGlobalSection 29 | GlobalSection(SolutionProperties) = preSolution 30 | HideSolutionNode = FALSE 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /extenal/shmdb/src/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.14.1 from Makefile.am. 2 | # src/Makefile. Generated from Makefile.in by configure. 3 | 4 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | 16 | 17 | 18 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 19 | am__make_running_with_option = \ 20 | case $${target_option-} in \ 21 | ?) ;; \ 22 | *) echo "am__make_running_with_option: internal error: invalid" \ 23 | "target option '$${target_option-}' specified" >&2; \ 24 | exit 1;; \ 25 | esac; \ 26 | has_opt=no; \ 27 | sane_makeflags=$$MAKEFLAGS; \ 28 | if $(am__is_gnu_make); then \ 29 | sane_makeflags=$$MFLAGS; \ 30 | else \ 31 | case $$MAKEFLAGS in \ 32 | *\\[\ \ ]*) \ 33 | bs=\\; \ 34 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 35 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 36 | esac; \ 37 | fi; \ 38 | skip_next=no; \ 39 | strip_trailopt () \ 40 | { \ 41 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 42 | }; \ 43 | for flg in $$sane_makeflags; do \ 44 | test $$skip_next = yes && { skip_next=no; continue; }; \ 45 | case $$flg in \ 46 | *=*|--*) continue;; \ 47 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 48 | -*I?*) strip_trailopt 'I';; \ 49 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 50 | -*O?*) strip_trailopt 'O';; \ 51 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 52 | -*l?*) strip_trailopt 'l';; \ 53 | -[dEDm]) skip_next=yes;; \ 54 | -[JT]) skip_next=yes;; \ 55 | esac; \ 56 | case $$flg in \ 57 | *$$target_option*) has_opt=yes; break;; \ 58 | esac; \ 59 | done; \ 60 | test $$has_opt = yes 61 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 62 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 63 | pkgdatadir = $(datadir)/appexp 64 | pkgincludedir = $(includedir)/appexp 65 | pkglibdir = $(libdir)/appexp 66 | pkglibexecdir = $(libexecdir)/appexp 67 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 68 | install_sh_DATA = $(install_sh) -c -m 644 69 | install_sh_PROGRAM = $(install_sh) -c 70 | install_sh_SCRIPT = $(install_sh) -c 71 | INSTALL_HEADER = $(INSTALL_DATA) 72 | transform = $(program_transform_name) 73 | NORMAL_INSTALL = : 74 | PRE_INSTALL = : 75 | POST_INSTALL = : 76 | NORMAL_UNINSTALL = : 77 | PRE_UNINSTALL = : 78 | POST_UNINSTALL = : 79 | subdir = src 80 | DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ 81 | $(top_srcdir)/depcomp 82 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 83 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 84 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 85 | $(ACLOCAL_M4) 86 | mkinstalldirs = $(install_sh) -d 87 | CONFIG_CLEAN_FILES = 88 | CONFIG_CLEAN_VPATH_FILES = 89 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 90 | am__vpath_adj = case $$p in \ 91 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 92 | *) f=$$p;; \ 93 | esac; 94 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 95 | am__install_max = 40 96 | am__nobase_strip_setup = \ 97 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 98 | am__nobase_strip = \ 99 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 100 | am__nobase_list = $(am__nobase_strip_setup); \ 101 | for p in $$list; do echo "$$p $$p"; done | \ 102 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ 103 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ 104 | if (++n[$$2] == $(am__install_max)) \ 105 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ 106 | END { for (dir in files) print dir, files[dir] }' 107 | am__base_list = \ 108 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 109 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 110 | am__uninstall_files_from_dir = { \ 111 | test -z "$$files" \ 112 | || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ 113 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ 114 | $(am__cd) "$$dir" && rm -f $$files; }; \ 115 | } 116 | am__installdirs = "$(DESTDIR)$(libdir)" 117 | LIBRARIES = $(lib_LIBRARIES) 118 | AR = ar 119 | ARFLAGS = cru 120 | AM_V_AR = $(am__v_AR_$(V)) 121 | am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) 122 | am__v_AR_0 = @echo " AR " $@; 123 | am__v_AR_1 = 124 | libshmdb_a_AR = $(AR) $(ARFLAGS) 125 | libshmdb_a_LIBADD = 126 | am_libshmdb_a_OBJECTS = mm.$(OBJEXT) hash.$(OBJEXT) prime.$(OBJEXT) \ 127 | transform.$(OBJEXT) 128 | libshmdb_a_OBJECTS = $(am_libshmdb_a_OBJECTS) 129 | AM_V_P = $(am__v_P_$(V)) 130 | am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) 131 | am__v_P_0 = false 132 | am__v_P_1 = : 133 | AM_V_GEN = $(am__v_GEN_$(V)) 134 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) 135 | am__v_GEN_0 = @echo " GEN " $@; 136 | am__v_GEN_1 = 137 | AM_V_at = $(am__v_at_$(V)) 138 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) 139 | am__v_at_0 = @ 140 | am__v_at_1 = 141 | DEFAULT_INCLUDES = -I. 142 | depcomp = $(SHELL) $(top_srcdir)/depcomp 143 | am__depfiles_maybe = depfiles 144 | am__mv = mv -f 145 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 146 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 147 | AM_V_CC = $(am__v_CC_$(V)) 148 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) 149 | am__v_CC_0 = @echo " CC " $@; 150 | am__v_CC_1 = 151 | CCLD = $(CC) 152 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 153 | AM_V_CCLD = $(am__v_CCLD_$(V)) 154 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) 155 | am__v_CCLD_0 = @echo " CCLD " $@; 156 | am__v_CCLD_1 = 157 | SOURCES = $(libshmdb_a_SOURCES) 158 | DIST_SOURCES = $(libshmdb_a_SOURCES) 159 | am__can_run_installinfo = \ 160 | case $$AM_UPDATE_INFO_DIR in \ 161 | n|no|NO) false;; \ 162 | *) (install-info --version) >/dev/null 2>&1;; \ 163 | esac 164 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 165 | # Read a list of newline-separated strings from the standard input, 166 | # and print each of them once, without duplicates. Input order is 167 | # *not* preserved. 168 | am__uniquify_input = $(AWK) '\ 169 | BEGIN { nonempty = 0; } \ 170 | { items[$$0] = 1; nonempty = 1; } \ 171 | END { if (nonempty) { for (i in items) print i; }; } \ 172 | ' 173 | # Make sure the list of sources is unique. This is necessary because, 174 | # e.g., the same source file might be shared among _SOURCES variables 175 | # for different programs/libraries. 176 | am__define_uniq_tagged_files = \ 177 | list='$(am__tagged_files)'; \ 178 | unique=`for i in $$list; do \ 179 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 180 | done | $(am__uniquify_input)` 181 | ETAGS = etags 182 | CTAGS = ctags 183 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 184 | ACLOCAL = ${SHELL} /home/gaoyang/mm/missing aclocal-1.14 185 | AMTAR = $${TAR-tar} 186 | AM_DEFAULT_VERBOSITY = 1 187 | AUTOCONF = ${SHELL} /home/gaoyang/mm/missing autoconf 188 | AUTOHEADER = ${SHELL} /home/gaoyang/mm/missing autoheader 189 | AUTOMAKE = ${SHELL} /home/gaoyang/mm/missing automake-1.14 190 | AWK = mawk 191 | CC = gcc 192 | CCDEPMODE = depmode=gcc3 193 | CFLAGS = -g -O2 194 | CPPFLAGS = 195 | CYGPATH_W = echo 196 | DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"appexp\" -DVERSION=\"0.1.00\" 197 | DEPDIR = .deps 198 | ECHO_C = 199 | ECHO_N = -n 200 | ECHO_T = 201 | EXEEXT = 202 | INSTALL = /usr/bin/install -c 203 | INSTALL_DATA = ${INSTALL} -m 644 204 | INSTALL_PROGRAM = ${INSTALL} 205 | INSTALL_SCRIPT = ${INSTALL} 206 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s 207 | LDFLAGS = 208 | LIBOBJS = 209 | LIBS = 210 | LTLIBOBJS = 211 | MAKEINFO = ${SHELL} /home/gaoyang/mm/missing makeinfo 212 | MKDIR_P = /bin/mkdir -p 213 | OBJEXT = o 214 | PACKAGE = appexp 215 | PACKAGE_BUGREPORT = 216 | PACKAGE_NAME = 217 | PACKAGE_STRING = 218 | PACKAGE_TARNAME = 219 | PACKAGE_URL = 220 | PACKAGE_VERSION = 221 | PATH_SEPARATOR = : 222 | RANLIB = ranlib 223 | SET_MAKE = 224 | SHELL = /bin/bash 225 | STRIP = 226 | VERSION = 0.1.00 227 | abs_builddir = /home/gaoyang/mm/src 228 | abs_srcdir = /home/gaoyang/mm/src 229 | abs_top_builddir = /home/gaoyang/mm 230 | abs_top_srcdir = /home/gaoyang/mm 231 | ac_ct_CC = gcc 232 | am__include = include 233 | am__leading_dot = . 234 | am__quote = 235 | am__tar = $${TAR-tar} chof - "$$tardir" 236 | am__untar = $${TAR-tar} xf - 237 | bindir = ${exec_prefix}/bin 238 | build_alias = 239 | builddir = . 240 | datadir = ${datarootdir} 241 | datarootdir = ${prefix}/share 242 | docdir = ${datarootdir}/doc/${PACKAGE} 243 | dvidir = ${docdir} 244 | exec_prefix = ${prefix} 245 | host_alias = 246 | htmldir = ${docdir} 247 | includedir = ${prefix}/include 248 | infodir = ${datarootdir}/info 249 | install_sh = ${SHELL} /home/gaoyang/mm/install-sh 250 | libdir = ${exec_prefix}/lib 251 | libexecdir = ${exec_prefix}/libexec 252 | localedir = ${datarootdir}/locale 253 | localstatedir = ${prefix}/var 254 | mandir = ${datarootdir}/man 255 | mkdir_p = $(MKDIR_P) 256 | oldincludedir = /usr/include 257 | pdfdir = ${docdir} 258 | prefix = /usr/local 259 | program_transform_name = s,x,x, 260 | psdir = ${docdir} 261 | sbindir = ${exec_prefix}/sbin 262 | sharedstatedir = ${prefix}/com 263 | srcdir = . 264 | sysconfdir = ${prefix}/etc 265 | target_alias = 266 | top_build_prefix = ../ 267 | top_builddir = .. 268 | top_srcdir = .. 269 | lib_LIBRARIES = libshmdb.a 270 | libshmdb_a_SOURCES = mm.c hash.c prime.c transform.c 271 | all: all-am 272 | 273 | .SUFFIXES: 274 | .SUFFIXES: .c .o .obj 275 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 276 | @for dep in $?; do \ 277 | case '$(am__configure_deps)' in \ 278 | *$$dep*) \ 279 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 280 | && { if test -f $@; then exit 0; else break; fi; }; \ 281 | exit 1;; \ 282 | esac; \ 283 | done; \ 284 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ 285 | $(am__cd) $(top_srcdir) && \ 286 | $(AUTOMAKE) --gnu src/Makefile 287 | .PRECIOUS: Makefile 288 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 289 | @case '$?' in \ 290 | *config.status*) \ 291 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 292 | *) \ 293 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 294 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 295 | esac; 296 | 297 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 298 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 299 | 300 | $(top_srcdir)/configure: $(am__configure_deps) 301 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 302 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 303 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 304 | $(am__aclocal_m4_deps): 305 | install-libLIBRARIES: $(lib_LIBRARIES) 306 | @$(NORMAL_INSTALL) 307 | @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ 308 | list2=; for p in $$list; do \ 309 | if test -f $$p; then \ 310 | list2="$$list2 $$p"; \ 311 | else :; fi; \ 312 | done; \ 313 | test -z "$$list2" || { \ 314 | echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ 315 | $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ 316 | echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ 317 | $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } 318 | @$(POST_INSTALL) 319 | @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ 320 | for p in $$list; do \ 321 | if test -f $$p; then \ 322 | $(am__strip_dir) \ 323 | echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ 324 | ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ 325 | else :; fi; \ 326 | done 327 | 328 | uninstall-libLIBRARIES: 329 | @$(NORMAL_UNINSTALL) 330 | @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ 331 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ 332 | dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) 333 | 334 | clean-libLIBRARIES: 335 | -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) 336 | 337 | libshmdb.a: $(libshmdb_a_OBJECTS) $(libshmdb_a_DEPENDENCIES) $(EXTRA_libshmdb_a_DEPENDENCIES) 338 | $(AM_V_at)-rm -f libshmdb.a 339 | $(AM_V_AR)$(libshmdb_a_AR) libshmdb.a $(libshmdb_a_OBJECTS) $(libshmdb_a_LIBADD) 340 | $(AM_V_at)$(RANLIB) libshmdb.a 341 | 342 | mostlyclean-compile: 343 | -rm -f *.$(OBJEXT) 344 | 345 | distclean-compile: 346 | -rm -f *.tab.c 347 | 348 | include ./$(DEPDIR)/hash.Po 349 | include ./$(DEPDIR)/mm.Po 350 | include ./$(DEPDIR)/prime.Po 351 | include ./$(DEPDIR)/transform.Po 352 | 353 | .c.o: 354 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 355 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 356 | # $(AM_V_CC)source='$<' object='$@' libtool=no \ 357 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ 358 | # $(AM_V_CC_no)$(COMPILE) -c -o $@ $< 359 | 360 | .c.obj: 361 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 362 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 363 | # $(AM_V_CC)source='$<' object='$@' libtool=no \ 364 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ 365 | # $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 366 | 367 | ID: $(am__tagged_files) 368 | $(am__define_uniq_tagged_files); mkid -fID $$unique 369 | tags: tags-am 370 | TAGS: tags 371 | 372 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 373 | set x; \ 374 | here=`pwd`; \ 375 | $(am__define_uniq_tagged_files); \ 376 | shift; \ 377 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 378 | test -n "$$unique" || unique=$$empty_fix; \ 379 | if test $$# -gt 0; then \ 380 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 381 | "$$@" $$unique; \ 382 | else \ 383 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 384 | $$unique; \ 385 | fi; \ 386 | fi 387 | ctags: ctags-am 388 | 389 | CTAGS: ctags 390 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 391 | $(am__define_uniq_tagged_files); \ 392 | test -z "$(CTAGS_ARGS)$$unique" \ 393 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 394 | $$unique 395 | 396 | GTAGS: 397 | here=`$(am__cd) $(top_builddir) && pwd` \ 398 | && $(am__cd) $(top_srcdir) \ 399 | && gtags -i $(GTAGS_ARGS) "$$here" 400 | cscopelist: cscopelist-am 401 | 402 | cscopelist-am: $(am__tagged_files) 403 | list='$(am__tagged_files)'; \ 404 | case "$(srcdir)" in \ 405 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 406 | *) sdir=$(subdir)/$(srcdir) ;; \ 407 | esac; \ 408 | for i in $$list; do \ 409 | if test -f "$$i"; then \ 410 | echo "$(subdir)/$$i"; \ 411 | else \ 412 | echo "$$sdir/$$i"; \ 413 | fi; \ 414 | done >> $(top_builddir)/cscope.files 415 | 416 | distclean-tags: 417 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 418 | 419 | distdir: $(DISTFILES) 420 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 421 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 422 | list='$(DISTFILES)'; \ 423 | dist_files=`for file in $$list; do echo $$file; done | \ 424 | sed -e "s|^$$srcdirstrip/||;t" \ 425 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 426 | case $$dist_files in \ 427 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 428 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 429 | sort -u` ;; \ 430 | esac; \ 431 | for file in $$dist_files; do \ 432 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 433 | if test -d $$d/$$file; then \ 434 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 435 | if test -d "$(distdir)/$$file"; then \ 436 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 437 | fi; \ 438 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 439 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 440 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 441 | fi; \ 442 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 443 | else \ 444 | test -f "$(distdir)/$$file" \ 445 | || cp -p $$d/$$file "$(distdir)/$$file" \ 446 | || exit 1; \ 447 | fi; \ 448 | done 449 | check-am: all-am 450 | check: check-am 451 | all-am: Makefile $(LIBRARIES) 452 | installdirs: 453 | for dir in "$(DESTDIR)$(libdir)"; do \ 454 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 455 | done 456 | install: install-am 457 | install-exec: install-exec-am 458 | install-data: install-data-am 459 | uninstall: uninstall-am 460 | 461 | install-am: all-am 462 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 463 | 464 | installcheck: installcheck-am 465 | install-strip: 466 | if test -z '$(STRIP)'; then \ 467 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 468 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 469 | install; \ 470 | else \ 471 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 472 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 473 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 474 | fi 475 | mostlyclean-generic: 476 | 477 | clean-generic: 478 | 479 | distclean-generic: 480 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 481 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 482 | 483 | maintainer-clean-generic: 484 | @echo "This command is intended for maintainers to use" 485 | @echo "it deletes files that may require special tools to rebuild." 486 | clean: clean-am 487 | 488 | clean-am: clean-generic clean-libLIBRARIES mostlyclean-am 489 | 490 | distclean: distclean-am 491 | -rm -rf ./$(DEPDIR) 492 | -rm -f Makefile 493 | distclean-am: clean-am distclean-compile distclean-generic \ 494 | distclean-tags 495 | 496 | dvi: dvi-am 497 | 498 | dvi-am: 499 | 500 | html: html-am 501 | 502 | html-am: 503 | 504 | info: info-am 505 | 506 | info-am: 507 | 508 | install-data-am: 509 | 510 | install-dvi: install-dvi-am 511 | 512 | install-dvi-am: 513 | 514 | install-exec-am: install-libLIBRARIES 515 | 516 | install-html: install-html-am 517 | 518 | install-html-am: 519 | 520 | install-info: install-info-am 521 | 522 | install-info-am: 523 | 524 | install-man: 525 | 526 | install-pdf: install-pdf-am 527 | 528 | install-pdf-am: 529 | 530 | install-ps: install-ps-am 531 | 532 | install-ps-am: 533 | 534 | installcheck-am: 535 | 536 | maintainer-clean: maintainer-clean-am 537 | -rm -rf ./$(DEPDIR) 538 | -rm -f Makefile 539 | maintainer-clean-am: distclean-am maintainer-clean-generic 540 | 541 | mostlyclean: mostlyclean-am 542 | 543 | mostlyclean-am: mostlyclean-compile mostlyclean-generic 544 | 545 | pdf: pdf-am 546 | 547 | pdf-am: 548 | 549 | ps: ps-am 550 | 551 | ps-am: 552 | 553 | uninstall-am: uninstall-libLIBRARIES 554 | 555 | .MAKE: install-am install-strip 556 | 557 | .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ 558 | clean-libLIBRARIES cscopelist-am ctags ctags-am distclean \ 559 | distclean-compile distclean-generic distclean-tags distdir dvi \ 560 | dvi-am html html-am info info-am install install-am \ 561 | install-data install-data-am install-dvi install-dvi-am \ 562 | install-exec install-exec-am install-html install-html-am \ 563 | install-info install-info-am install-libLIBRARIES install-man \ 564 | install-pdf install-pdf-am install-ps install-ps-am \ 565 | install-strip installcheck installcheck-am installdirs \ 566 | maintainer-clean maintainer-clean-generic mostlyclean \ 567 | mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ 568 | tags tags-am uninstall uninstall-am uninstall-libLIBRARIES 569 | 570 | 571 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 572 | # Otherwise a system limit (for SysV at least) may be exceeded. 573 | .NOEXPORT: 574 | -------------------------------------------------------------------------------- /extenal/shmdb/src/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LIBRARIES = libshmdb.a 2 | libshmdb_a_SOURCES = mm.c hash.c prime.c transform.c 3 | 4 | -------------------------------------------------------------------------------- /extenal/shmdb/src/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.14.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | 17 | VPATH = @srcdir@ 18 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 19 | am__make_running_with_option = \ 20 | case $${target_option-} in \ 21 | ?) ;; \ 22 | *) echo "am__make_running_with_option: internal error: invalid" \ 23 | "target option '$${target_option-}' specified" >&2; \ 24 | exit 1;; \ 25 | esac; \ 26 | has_opt=no; \ 27 | sane_makeflags=$$MAKEFLAGS; \ 28 | if $(am__is_gnu_make); then \ 29 | sane_makeflags=$$MFLAGS; \ 30 | else \ 31 | case $$MAKEFLAGS in \ 32 | *\\[\ \ ]*) \ 33 | bs=\\; \ 34 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 35 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 36 | esac; \ 37 | fi; \ 38 | skip_next=no; \ 39 | strip_trailopt () \ 40 | { \ 41 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 42 | }; \ 43 | for flg in $$sane_makeflags; do \ 44 | test $$skip_next = yes && { skip_next=no; continue; }; \ 45 | case $$flg in \ 46 | *=*|--*) continue;; \ 47 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 48 | -*I?*) strip_trailopt 'I';; \ 49 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 50 | -*O?*) strip_trailopt 'O';; \ 51 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 52 | -*l?*) strip_trailopt 'l';; \ 53 | -[dEDm]) skip_next=yes;; \ 54 | -[JT]) skip_next=yes;; \ 55 | esac; \ 56 | case $$flg in \ 57 | *$$target_option*) has_opt=yes; break;; \ 58 | esac; \ 59 | done; \ 60 | test $$has_opt = yes 61 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 62 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 63 | pkgdatadir = $(datadir)/@PACKAGE@ 64 | pkgincludedir = $(includedir)/@PACKAGE@ 65 | pkglibdir = $(libdir)/@PACKAGE@ 66 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 67 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 68 | install_sh_DATA = $(install_sh) -c -m 644 69 | install_sh_PROGRAM = $(install_sh) -c 70 | install_sh_SCRIPT = $(install_sh) -c 71 | INSTALL_HEADER = $(INSTALL_DATA) 72 | transform = $(program_transform_name) 73 | NORMAL_INSTALL = : 74 | PRE_INSTALL = : 75 | POST_INSTALL = : 76 | NORMAL_UNINSTALL = : 77 | PRE_UNINSTALL = : 78 | POST_UNINSTALL = : 79 | subdir = src 80 | DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ 81 | $(top_srcdir)/depcomp 82 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 83 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 84 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 85 | $(ACLOCAL_M4) 86 | mkinstalldirs = $(install_sh) -d 87 | CONFIG_CLEAN_FILES = 88 | CONFIG_CLEAN_VPATH_FILES = 89 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 90 | am__vpath_adj = case $$p in \ 91 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 92 | *) f=$$p;; \ 93 | esac; 94 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 95 | am__install_max = 40 96 | am__nobase_strip_setup = \ 97 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 98 | am__nobase_strip = \ 99 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 100 | am__nobase_list = $(am__nobase_strip_setup); \ 101 | for p in $$list; do echo "$$p $$p"; done | \ 102 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ 103 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ 104 | if (++n[$$2] == $(am__install_max)) \ 105 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ 106 | END { for (dir in files) print dir, files[dir] }' 107 | am__base_list = \ 108 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 109 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 110 | am__uninstall_files_from_dir = { \ 111 | test -z "$$files" \ 112 | || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ 113 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ 114 | $(am__cd) "$$dir" && rm -f $$files; }; \ 115 | } 116 | am__installdirs = "$(DESTDIR)$(libdir)" 117 | LIBRARIES = $(lib_LIBRARIES) 118 | AR = ar 119 | ARFLAGS = cru 120 | AM_V_AR = $(am__v_AR_@AM_V@) 121 | am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) 122 | am__v_AR_0 = @echo " AR " $@; 123 | am__v_AR_1 = 124 | libshmdb_a_AR = $(AR) $(ARFLAGS) 125 | libshmdb_a_LIBADD = 126 | am_libshmdb_a_OBJECTS = mm.$(OBJEXT) hash.$(OBJEXT) prime.$(OBJEXT) \ 127 | transform.$(OBJEXT) 128 | libshmdb_a_OBJECTS = $(am_libshmdb_a_OBJECTS) 129 | AM_V_P = $(am__v_P_@AM_V@) 130 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) 131 | am__v_P_0 = false 132 | am__v_P_1 = : 133 | AM_V_GEN = $(am__v_GEN_@AM_V@) 134 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 135 | am__v_GEN_0 = @echo " GEN " $@; 136 | am__v_GEN_1 = 137 | AM_V_at = $(am__v_at_@AM_V@) 138 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 139 | am__v_at_0 = @ 140 | am__v_at_1 = 141 | DEFAULT_INCLUDES = -I.@am__isrc@ 142 | depcomp = $(SHELL) $(top_srcdir)/depcomp 143 | am__depfiles_maybe = depfiles 144 | am__mv = mv -f 145 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 146 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 147 | AM_V_CC = $(am__v_CC_@AM_V@) 148 | am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) 149 | am__v_CC_0 = @echo " CC " $@; 150 | am__v_CC_1 = 151 | CCLD = $(CC) 152 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 153 | AM_V_CCLD = $(am__v_CCLD_@AM_V@) 154 | am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) 155 | am__v_CCLD_0 = @echo " CCLD " $@; 156 | am__v_CCLD_1 = 157 | SOURCES = $(libshmdb_a_SOURCES) 158 | DIST_SOURCES = $(libshmdb_a_SOURCES) 159 | am__can_run_installinfo = \ 160 | case $$AM_UPDATE_INFO_DIR in \ 161 | n|no|NO) false;; \ 162 | *) (install-info --version) >/dev/null 2>&1;; \ 163 | esac 164 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 165 | # Read a list of newline-separated strings from the standard input, 166 | # and print each of them once, without duplicates. Input order is 167 | # *not* preserved. 168 | am__uniquify_input = $(AWK) '\ 169 | BEGIN { nonempty = 0; } \ 170 | { items[$$0] = 1; nonempty = 1; } \ 171 | END { if (nonempty) { for (i in items) print i; }; } \ 172 | ' 173 | # Make sure the list of sources is unique. This is necessary because, 174 | # e.g., the same source file might be shared among _SOURCES variables 175 | # for different programs/libraries. 176 | am__define_uniq_tagged_files = \ 177 | list='$(am__tagged_files)'; \ 178 | unique=`for i in $$list; do \ 179 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 180 | done | $(am__uniquify_input)` 181 | ETAGS = etags 182 | CTAGS = ctags 183 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 184 | ACLOCAL = @ACLOCAL@ 185 | AMTAR = @AMTAR@ 186 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 187 | AUTOCONF = @AUTOCONF@ 188 | AUTOHEADER = @AUTOHEADER@ 189 | AUTOMAKE = @AUTOMAKE@ 190 | AWK = @AWK@ 191 | CC = @CC@ 192 | CCDEPMODE = @CCDEPMODE@ 193 | CFLAGS = @CFLAGS@ 194 | CPPFLAGS = @CPPFLAGS@ 195 | CYGPATH_W = @CYGPATH_W@ 196 | DEFS = @DEFS@ 197 | DEPDIR = @DEPDIR@ 198 | ECHO_C = @ECHO_C@ 199 | ECHO_N = @ECHO_N@ 200 | ECHO_T = @ECHO_T@ 201 | EXEEXT = @EXEEXT@ 202 | INSTALL = @INSTALL@ 203 | INSTALL_DATA = @INSTALL_DATA@ 204 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 205 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 206 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 207 | LDFLAGS = @LDFLAGS@ 208 | LIBOBJS = @LIBOBJS@ 209 | LIBS = @LIBS@ 210 | LTLIBOBJS = @LTLIBOBJS@ 211 | MAKEINFO = @MAKEINFO@ 212 | MKDIR_P = @MKDIR_P@ 213 | OBJEXT = @OBJEXT@ 214 | PACKAGE = @PACKAGE@ 215 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 216 | PACKAGE_NAME = @PACKAGE_NAME@ 217 | PACKAGE_STRING = @PACKAGE_STRING@ 218 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 219 | PACKAGE_URL = @PACKAGE_URL@ 220 | PACKAGE_VERSION = @PACKAGE_VERSION@ 221 | PATH_SEPARATOR = @PATH_SEPARATOR@ 222 | RANLIB = @RANLIB@ 223 | SET_MAKE = @SET_MAKE@ 224 | SHELL = @SHELL@ 225 | STRIP = @STRIP@ 226 | VERSION = @VERSION@ 227 | abs_builddir = @abs_builddir@ 228 | abs_srcdir = @abs_srcdir@ 229 | abs_top_builddir = @abs_top_builddir@ 230 | abs_top_srcdir = @abs_top_srcdir@ 231 | ac_ct_CC = @ac_ct_CC@ 232 | am__include = @am__include@ 233 | am__leading_dot = @am__leading_dot@ 234 | am__quote = @am__quote@ 235 | am__tar = @am__tar@ 236 | am__untar = @am__untar@ 237 | bindir = @bindir@ 238 | build_alias = @build_alias@ 239 | builddir = @builddir@ 240 | datadir = @datadir@ 241 | datarootdir = @datarootdir@ 242 | docdir = @docdir@ 243 | dvidir = @dvidir@ 244 | exec_prefix = @exec_prefix@ 245 | host_alias = @host_alias@ 246 | htmldir = @htmldir@ 247 | includedir = @includedir@ 248 | infodir = @infodir@ 249 | install_sh = @install_sh@ 250 | libdir = @libdir@ 251 | libexecdir = @libexecdir@ 252 | localedir = @localedir@ 253 | localstatedir = @localstatedir@ 254 | mandir = @mandir@ 255 | mkdir_p = @mkdir_p@ 256 | oldincludedir = @oldincludedir@ 257 | pdfdir = @pdfdir@ 258 | prefix = @prefix@ 259 | program_transform_name = @program_transform_name@ 260 | psdir = @psdir@ 261 | sbindir = @sbindir@ 262 | sharedstatedir = @sharedstatedir@ 263 | srcdir = @srcdir@ 264 | sysconfdir = @sysconfdir@ 265 | target_alias = @target_alias@ 266 | top_build_prefix = @top_build_prefix@ 267 | top_builddir = @top_builddir@ 268 | top_srcdir = @top_srcdir@ 269 | lib_LIBRARIES = libshmdb.a 270 | libshmdb_a_SOURCES = mm.c hash.c prime.c transform.c 271 | all: all-am 272 | 273 | .SUFFIXES: 274 | .SUFFIXES: .c .o .obj 275 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 276 | @for dep in $?; do \ 277 | case '$(am__configure_deps)' in \ 278 | *$$dep*) \ 279 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 280 | && { if test -f $@; then exit 0; else break; fi; }; \ 281 | exit 1;; \ 282 | esac; \ 283 | done; \ 284 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ 285 | $(am__cd) $(top_srcdir) && \ 286 | $(AUTOMAKE) --gnu src/Makefile 287 | .PRECIOUS: Makefile 288 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 289 | @case '$?' in \ 290 | *config.status*) \ 291 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 292 | *) \ 293 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 294 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 295 | esac; 296 | 297 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 298 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 299 | 300 | $(top_srcdir)/configure: $(am__configure_deps) 301 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 302 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 303 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 304 | $(am__aclocal_m4_deps): 305 | install-libLIBRARIES: $(lib_LIBRARIES) 306 | @$(NORMAL_INSTALL) 307 | @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ 308 | list2=; for p in $$list; do \ 309 | if test -f $$p; then \ 310 | list2="$$list2 $$p"; \ 311 | else :; fi; \ 312 | done; \ 313 | test -z "$$list2" || { \ 314 | echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ 315 | $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ 316 | echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \ 317 | $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; } 318 | @$(POST_INSTALL) 319 | @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ 320 | for p in $$list; do \ 321 | if test -f $$p; then \ 322 | $(am__strip_dir) \ 323 | echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \ 324 | ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \ 325 | else :; fi; \ 326 | done 327 | 328 | uninstall-libLIBRARIES: 329 | @$(NORMAL_UNINSTALL) 330 | @list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \ 331 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ 332 | dir='$(DESTDIR)$(libdir)'; $(am__uninstall_files_from_dir) 333 | 334 | clean-libLIBRARIES: 335 | -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) 336 | 337 | libshmdb.a: $(libshmdb_a_OBJECTS) $(libshmdb_a_DEPENDENCIES) $(EXTRA_libshmdb_a_DEPENDENCIES) 338 | $(AM_V_at)-rm -f libshmdb.a 339 | $(AM_V_AR)$(libshmdb_a_AR) libshmdb.a $(libshmdb_a_OBJECTS) $(libshmdb_a_LIBADD) 340 | $(AM_V_at)$(RANLIB) libshmdb.a 341 | 342 | mostlyclean-compile: 343 | -rm -f *.$(OBJEXT) 344 | 345 | distclean-compile: 346 | -rm -f *.tab.c 347 | 348 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ 349 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mm.Po@am__quote@ 350 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prime.Po@am__quote@ 351 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transform.Po@am__quote@ 352 | 353 | .c.o: 354 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 355 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 356 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 357 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 358 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< 359 | 360 | .c.obj: 361 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 362 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 363 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 364 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 365 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 366 | 367 | ID: $(am__tagged_files) 368 | $(am__define_uniq_tagged_files); mkid -fID $$unique 369 | tags: tags-am 370 | TAGS: tags 371 | 372 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 373 | set x; \ 374 | here=`pwd`; \ 375 | $(am__define_uniq_tagged_files); \ 376 | shift; \ 377 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 378 | test -n "$$unique" || unique=$$empty_fix; \ 379 | if test $$# -gt 0; then \ 380 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 381 | "$$@" $$unique; \ 382 | else \ 383 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 384 | $$unique; \ 385 | fi; \ 386 | fi 387 | ctags: ctags-am 388 | 389 | CTAGS: ctags 390 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 391 | $(am__define_uniq_tagged_files); \ 392 | test -z "$(CTAGS_ARGS)$$unique" \ 393 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 394 | $$unique 395 | 396 | GTAGS: 397 | here=`$(am__cd) $(top_builddir) && pwd` \ 398 | && $(am__cd) $(top_srcdir) \ 399 | && gtags -i $(GTAGS_ARGS) "$$here" 400 | cscopelist: cscopelist-am 401 | 402 | cscopelist-am: $(am__tagged_files) 403 | list='$(am__tagged_files)'; \ 404 | case "$(srcdir)" in \ 405 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 406 | *) sdir=$(subdir)/$(srcdir) ;; \ 407 | esac; \ 408 | for i in $$list; do \ 409 | if test -f "$$i"; then \ 410 | echo "$(subdir)/$$i"; \ 411 | else \ 412 | echo "$$sdir/$$i"; \ 413 | fi; \ 414 | done >> $(top_builddir)/cscope.files 415 | 416 | distclean-tags: 417 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 418 | 419 | distdir: $(DISTFILES) 420 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 421 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 422 | list='$(DISTFILES)'; \ 423 | dist_files=`for file in $$list; do echo $$file; done | \ 424 | sed -e "s|^$$srcdirstrip/||;t" \ 425 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 426 | case $$dist_files in \ 427 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 428 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 429 | sort -u` ;; \ 430 | esac; \ 431 | for file in $$dist_files; do \ 432 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 433 | if test -d $$d/$$file; then \ 434 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 435 | if test -d "$(distdir)/$$file"; then \ 436 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 437 | fi; \ 438 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 439 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 440 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 441 | fi; \ 442 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 443 | else \ 444 | test -f "$(distdir)/$$file" \ 445 | || cp -p $$d/$$file "$(distdir)/$$file" \ 446 | || exit 1; \ 447 | fi; \ 448 | done 449 | check-am: all-am 450 | check: check-am 451 | all-am: Makefile $(LIBRARIES) 452 | installdirs: 453 | for dir in "$(DESTDIR)$(libdir)"; do \ 454 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 455 | done 456 | install: install-am 457 | install-exec: install-exec-am 458 | install-data: install-data-am 459 | uninstall: uninstall-am 460 | 461 | install-am: all-am 462 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 463 | 464 | installcheck: installcheck-am 465 | install-strip: 466 | if test -z '$(STRIP)'; then \ 467 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 468 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 469 | install; \ 470 | else \ 471 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 472 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 473 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 474 | fi 475 | mostlyclean-generic: 476 | 477 | clean-generic: 478 | 479 | distclean-generic: 480 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 481 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 482 | 483 | maintainer-clean-generic: 484 | @echo "This command is intended for maintainers to use" 485 | @echo "it deletes files that may require special tools to rebuild." 486 | clean: clean-am 487 | 488 | clean-am: clean-generic clean-libLIBRARIES mostlyclean-am 489 | 490 | distclean: distclean-am 491 | -rm -rf ./$(DEPDIR) 492 | -rm -f Makefile 493 | distclean-am: clean-am distclean-compile distclean-generic \ 494 | distclean-tags 495 | 496 | dvi: dvi-am 497 | 498 | dvi-am: 499 | 500 | html: html-am 501 | 502 | html-am: 503 | 504 | info: info-am 505 | 506 | info-am: 507 | 508 | install-data-am: 509 | 510 | install-dvi: install-dvi-am 511 | 512 | install-dvi-am: 513 | 514 | install-exec-am: install-libLIBRARIES 515 | 516 | install-html: install-html-am 517 | 518 | install-html-am: 519 | 520 | install-info: install-info-am 521 | 522 | install-info-am: 523 | 524 | install-man: 525 | 526 | install-pdf: install-pdf-am 527 | 528 | install-pdf-am: 529 | 530 | install-ps: install-ps-am 531 | 532 | install-ps-am: 533 | 534 | installcheck-am: 535 | 536 | maintainer-clean: maintainer-clean-am 537 | -rm -rf ./$(DEPDIR) 538 | -rm -f Makefile 539 | maintainer-clean-am: distclean-am maintainer-clean-generic 540 | 541 | mostlyclean: mostlyclean-am 542 | 543 | mostlyclean-am: mostlyclean-compile mostlyclean-generic 544 | 545 | pdf: pdf-am 546 | 547 | pdf-am: 548 | 549 | ps: ps-am 550 | 551 | ps-am: 552 | 553 | uninstall-am: uninstall-libLIBRARIES 554 | 555 | .MAKE: install-am install-strip 556 | 557 | .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ 558 | clean-libLIBRARIES cscopelist-am ctags ctags-am distclean \ 559 | distclean-compile distclean-generic distclean-tags distdir dvi \ 560 | dvi-am html html-am info info-am install install-am \ 561 | install-data install-data-am install-dvi install-dvi-am \ 562 | install-exec install-exec-am install-html install-html-am \ 563 | install-info install-info-am install-libLIBRARIES install-man \ 564 | install-pdf install-pdf-am install-ps install-ps-am \ 565 | install-strip installcheck installcheck-am installdirs \ 566 | maintainer-clean maintainer-clean-generic mostlyclean \ 567 | mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ 568 | tags tags-am uninstall uninstall-am uninstall-libLIBRARIES 569 | 570 | 571 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 572 | # Otherwise a system limit (for SysV at least) may be exceeded. 573 | .NOEXPORT: 574 | -------------------------------------------------------------------------------- /extenal/shmdb/src/hash.c: -------------------------------------------------------------------------------- 1 | #include "prime.h" 2 | //#include 3 | 4 | unsigned int getHashNum(const char *str,unsigned int len,unsigned int maxPrime) 5 | { 6 | register unsigned int sum = 0; 7 | register unsigned int h = 0; 8 | register unsigned char *p = (unsigned char *)str; 9 | register unsigned char *s = (unsigned char *)str; 10 | //printf("str:%s,len:%d,h:%d,maxPrime:%d\n",p,len,h,maxPrime); 11 | 12 | while(p - s < len) 13 | { 14 | register unsigned short a =0; 15 | //printf("value:%d[%c][%d],offset:%d\n",*p,*p,p,p-s); 16 | a= (unsigned short)*(p++) * (p-s); 17 | //printf("a:%d\n",a); 18 | sum += sum ^ a; 19 | h += a; 20 | } 21 | //printf("sum:%d\n",sum); 22 | return ((sum << 16) | h) % maxPrime; 23 | } 24 | -------------------------------------------------------------------------------- /extenal/shmdb/src/log.c: -------------------------------------------------------------------------------- 1 | /** 2 | Open Source Initiative OSI - The MIT License (MIT):Licensing 3 | 4 | The MIT License (MIT) 5 | Copyright (c) <2012> 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 8 | and associated documentation files (the "Software"), to deal in the Software without restriction, 9 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all copies or substantial 14 | portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 17 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 18 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 20 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 21 | OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | @author yunnysunny 24 | 25 | */ 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #if defined(WIN32) || defined(WIN64) || defined(_WIN32) || defined(_WIN64) 34 | #include 35 | #include 36 | #include 37 | #define __IS_WIN__ 1 38 | #else 39 | #include 40 | #include 41 | #include 42 | #include 43 | #define __IS_WIN__ 0 44 | #endif 45 | 46 | #include "log.h" 47 | #define TIME_MAX 32 48 | #define COUNT_ERROR_LEVEL 6 49 | #define MAX_LOG_FILE_NAME_LEN 256 50 | #ifndef __DEFAULT_LOG_LEVEL 51 | #define __DEFAULT_LOG_LEVEL LEVEL_WARN 52 | #endif 53 | 54 | char *errorLevel[COUNT_ERROR_LEVEL] = {"FAULT","ERROR","WARN","INFO","DEBUG","TRACE"}; 55 | 56 | static int logLevel = __DEFAULT_LOG_LEVEL;// 57 | static char logFileName[MAX_LOG_FILE_NAME_LEN] = {0}; 58 | 59 | void setLogLevel(int nLogLevel) { 60 | if (nLogLevel < 1 || nLogLevel > COUNT_ERROR_LEVEL) { 61 | printf("error log level:%d\n",nLogLevel); 62 | return; 63 | } 64 | logLevel = nLogLevel; 65 | } 66 | 67 | void setLogFile(const char *fileName) { 68 | if (fileName == NULL) { 69 | return; 70 | } 71 | if (strlen(fileName) == 0) { 72 | return; 73 | } 74 | if (strlen(fileName) > MAX_LOG_FILE_NAME_LEN - 1) { 75 | printf("too long file name:%d\n",strlen(fileName)); 76 | return; 77 | } 78 | { 79 | FILE *f = NULL; 80 | #if __IS_WIN__ 81 | if ((fopen_s(&f,fileName,"rw")) != 0) { 82 | #else 83 | if ((f = fopen(fileName,"rw")) == NULL) { 84 | #endif 85 | printf("open log file [%s] error\n",fileName); 86 | return; 87 | } 88 | fclose(f); 89 | #if __IS_WIN__ 90 | strncpy_s(logFileName,MAX_LOG_FILE_NAME_LEN,fileName,strlen(fileName)); 91 | #else 92 | strncpy(logFileName,fileName,MAX_LOG_FILE_NAME_LEN); 93 | #endif 94 | } 95 | } 96 | 97 | 98 | void printLog(char* sModule, int nLogLevel, char *sFile,int nLine,char *fmt, ...) 99 | { 100 | struct tm newTimeST; 101 | #if __IS_WIN__ 102 | DWORD nThreadID; 103 | #else 104 | unsigned int nThreadID; 105 | #endif 106 | 107 | struct tm *newtime = &newTimeST; 108 | time_t aclock; 109 | 110 | FILE *logFile = NULL; 111 | va_list ap1, ap2;; 112 | 113 | if (nLogLevel < 1 || nLogLevel > COUNT_ERROR_LEVEL) { 114 | printf("error log level:%d\n",nLogLevel); 115 | return; 116 | } 117 | 118 | if (nLogLevel > logLevel) { 119 | return; 120 | } 121 | 122 | time( &aclock ); 123 | 124 | #if __IS_WIN__ 125 | localtime_s(newtime, &aclock ); 126 | nThreadID = GetCurrentProcessId(); 127 | nThreadID = (nThreadID << 16) + GetCurrentThreadId(); 128 | #else 129 | newtime = localtime( &aclock ); 130 | nThreadID = getpid(); 131 | nThreadID = (nThreadID << 16) + pthread_self(); 132 | #endif 133 | if (strlen(logFileName) > 0) { 134 | #if __IS_WIN__ 135 | if ((fopen_s(&logFile,logFileName,"rb+")) != 0) { 136 | #else 137 | if ((logFile = fopen(logFileName,"rb+")) == NULL) { 138 | #endif 139 | printf("open log file [%s] error\n",logFileName); 140 | } 141 | } 142 | printf("\n[%4d-%02d-%02d %02d:%02d:%02d][%s][%ud][%s:%d][%s] ", 143 | newtime->tm_year+1900,newtime->tm_mon+1,newtime->tm_mday,newtime->tm_hour, 144 | newtime->tm_min,newtime->tm_sec,sModule,nThreadID,sFile,nLine,errorLevel[nLogLevel-1]); 145 | va_start(ap1, fmt); 146 | if (logFile != NULL) { 147 | #if __IS_WIN__ 148 | ap2 = ap1; 149 | #else 150 | va_copy(ap2, ap1); 151 | #endif 152 | vfprintf(logFile,fmt,ap2); 153 | } 154 | vprintf(fmt,ap1); 155 | if (logFile != NULL) { 156 | va_end(ap2); 157 | } 158 | va_end(ap1); 159 | } 160 | 161 | int errorReturn(int errorCode,char *tag,char *msg) 162 | { 163 | LOG_WITH_TAG(LEVEL_ERROR,tag,errorCode,msg); 164 | return errorCode; 165 | } 166 | 167 | -------------------------------------------------------------------------------- /extenal/shmdb/src/prime.c: -------------------------------------------------------------------------------- 1 | 2 | unsigned int getMaxPrime(unsigned int num) 3 | { 4 | unsigned int n; 5 | unsigned int m; 6 | unsigned int k; 7 | unsigned int p = 0; 8 | int loopEnd = num / 6 + 1; 9 | if (loopEnd < 3) { 10 | return 7; 11 | } 12 | for(n = loopEnd; n >= 2; n--) 13 | { 14 | for(m = 0; m <= 1; m++) 15 | { 16 | unsigned int tmp = 2 * (3 * n + m) - 1;//6n+-1 17 | 18 | int find = 1; 19 | if (tmp > num) { 20 | goto label1; 21 | } 22 | if (tmp < 2) 23 | { 24 | continue; 25 | } 26 | for (k = 2; k * k <= tmp; k++) 27 | { 28 | if (tmp % k == 0) //不是质数 29 | { 30 | 31 | if (m == 0) 32 | { 33 | find = 0; 34 | goto label2;//继续内层循环 35 | } 36 | else 37 | { 38 | goto label1;//继续外层循环 39 | } 40 | } 41 | } 42 | label2: 43 | if (find == 1) 44 | { 45 | p = tmp; 46 | goto end;//结束所有循环 47 | } 48 | 49 | //return p; 50 | } 51 | label1: 52 | ;// 53 | } 54 | end: 55 | return p; 56 | } 57 | -------------------------------------------------------------------------------- /extenal/shmdb/src/src.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {F4316E0C-D450-4E89-AD50-9C204E484531} 15 | src 16 | 17 | 18 | 19 | StaticLibrary 20 | true 21 | v110 22 | MultiByte 23 | 24 | 25 | StaticLibrary 26 | false 27 | v110 28 | true 29 | MultiByte 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | shmdb 43 | 44 | 45 | shmdb 46 | $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);../include 47 | 48 | 49 | 50 | Level3 51 | Disabled 52 | true 53 | 54 | 55 | true 56 | 57 | 58 | 59 | 60 | Level3 61 | MaxSpeed 62 | true 63 | true 64 | true 65 | 66 | 67 | true 68 | true 69 | true 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /extenal/shmdb/src/src.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | -------------------------------------------------------------------------------- /extenal/shmdb/src/transform.c: -------------------------------------------------------------------------------- 1 | #include "transform.h" 2 | #include 3 | 4 | int int2chars(unsigned int num,unsigned char* chars) { 5 | if (chars != NULL) 6 | { 7 | chars[0] = num>>24; 8 | chars[1] = (num<<8)>>24; 9 | chars[2] = (num<<16)>>24; 10 | chars[3] = (num<<24)>>24; 11 | } 12 | return 0; 13 | } 14 | 15 | int chars2int(unsigned char* chars,unsigned int *num) { 16 | 17 | unsigned int a = chars[0]; 18 | unsigned int b = chars[1]; 19 | unsigned int c = chars[2]; 20 | unsigned int d = chars[3]; 21 | 22 | *num = (a<<24) + (b<<16) + (c<<8) + d; 23 | 24 | return 0; 25 | } 26 | 27 | int short2chars(unsigned short num,unsigned char *chars) { 28 | if (chars != NULL) { 29 | chars[0] = num >> 8; 30 | chars[1] = (num << 8) >> 8; 31 | } 32 | return 0; 33 | } 34 | 35 | int chars2short(unsigned char *chars,unsigned short *num) { 36 | unsigned short a = chars[0]; 37 | unsigned short b = chars[1]; 38 | *num = (a<<8) + b; 39 | return 0; 40 | } 41 | -------------------------------------------------------------------------------- /extenal/shmdb/test/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.14.1 from Makefile.am. 2 | # test/Makefile. Generated from Makefile.in by configure. 3 | 4 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | 16 | 17 | 18 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 19 | am__make_running_with_option = \ 20 | case $${target_option-} in \ 21 | ?) ;; \ 22 | *) echo "am__make_running_with_option: internal error: invalid" \ 23 | "target option '$${target_option-}' specified" >&2; \ 24 | exit 1;; \ 25 | esac; \ 26 | has_opt=no; \ 27 | sane_makeflags=$$MAKEFLAGS; \ 28 | if $(am__is_gnu_make); then \ 29 | sane_makeflags=$$MFLAGS; \ 30 | else \ 31 | case $$MAKEFLAGS in \ 32 | *\\[\ \ ]*) \ 33 | bs=\\; \ 34 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 35 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 36 | esac; \ 37 | fi; \ 38 | skip_next=no; \ 39 | strip_trailopt () \ 40 | { \ 41 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 42 | }; \ 43 | for flg in $$sane_makeflags; do \ 44 | test $$skip_next = yes && { skip_next=no; continue; }; \ 45 | case $$flg in \ 46 | *=*|--*) continue;; \ 47 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 48 | -*I?*) strip_trailopt 'I';; \ 49 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 50 | -*O?*) strip_trailopt 'O';; \ 51 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 52 | -*l?*) strip_trailopt 'l';; \ 53 | -[dEDm]) skip_next=yes;; \ 54 | -[JT]) skip_next=yes;; \ 55 | esac; \ 56 | case $$flg in \ 57 | *$$target_option*) has_opt=yes; break;; \ 58 | esac; \ 59 | done; \ 60 | test $$has_opt = yes 61 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 62 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 63 | pkgdatadir = $(datadir)/appexp 64 | pkgincludedir = $(includedir)/appexp 65 | pkglibdir = $(libdir)/appexp 66 | pkglibexecdir = $(libexecdir)/appexp 67 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 68 | install_sh_DATA = $(install_sh) -c -m 644 69 | install_sh_PROGRAM = $(install_sh) -c 70 | install_sh_SCRIPT = $(install_sh) -c 71 | INSTALL_HEADER = $(INSTALL_DATA) 72 | transform = $(program_transform_name) 73 | NORMAL_INSTALL = : 74 | PRE_INSTALL = : 75 | POST_INSTALL = : 76 | NORMAL_UNINSTALL = : 77 | PRE_UNINSTALL = : 78 | POST_UNINSTALL = : 79 | bin_PROGRAMS = appexp$(EXEEXT) 80 | subdir = test 81 | DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ 82 | $(top_srcdir)/depcomp 83 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 84 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 85 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 86 | $(ACLOCAL_M4) 87 | mkinstalldirs = $(install_sh) -d 88 | CONFIG_CLEAN_FILES = 89 | CONFIG_CLEAN_VPATH_FILES = 90 | am__installdirs = "$(DESTDIR)$(bindir)" 91 | PROGRAMS = $(bin_PROGRAMS) 92 | am_appexp_OBJECTS = appexp-main_test.$(OBJEXT) 93 | appexp_OBJECTS = $(am_appexp_OBJECTS) 94 | appexp_DEPENDENCIES = $(top_builddir)/src/libshmdb.a 95 | AM_V_P = $(am__v_P_$(V)) 96 | am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) 97 | am__v_P_0 = false 98 | am__v_P_1 = : 99 | AM_V_GEN = $(am__v_GEN_$(V)) 100 | am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) 101 | am__v_GEN_0 = @echo " GEN " $@; 102 | am__v_GEN_1 = 103 | AM_V_at = $(am__v_at_$(V)) 104 | am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) 105 | am__v_at_0 = @ 106 | am__v_at_1 = 107 | DEFAULT_INCLUDES = -I. 108 | depcomp = $(SHELL) $(top_srcdir)/depcomp 109 | am__depfiles_maybe = depfiles 110 | am__mv = mv -f 111 | AM_V_lt = $(am__v_lt_$(V)) 112 | am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) 113 | am__v_lt_0 = --silent 114 | am__v_lt_1 = 115 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 116 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 117 | AM_V_CC = $(am__v_CC_$(V)) 118 | am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) 119 | am__v_CC_0 = @echo " CC " $@; 120 | am__v_CC_1 = 121 | CCLD = $(CC) 122 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 123 | AM_V_CCLD = $(am__v_CCLD_$(V)) 124 | am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) 125 | am__v_CCLD_0 = @echo " CCLD " $@; 126 | am__v_CCLD_1 = 127 | SOURCES = $(appexp_SOURCES) 128 | DIST_SOURCES = $(appexp_SOURCES) 129 | am__can_run_installinfo = \ 130 | case $$AM_UPDATE_INFO_DIR in \ 131 | n|no|NO) false;; \ 132 | *) (install-info --version) >/dev/null 2>&1;; \ 133 | esac 134 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 135 | # Read a list of newline-separated strings from the standard input, 136 | # and print each of them once, without duplicates. Input order is 137 | # *not* preserved. 138 | am__uniquify_input = $(AWK) '\ 139 | BEGIN { nonempty = 0; } \ 140 | { items[$$0] = 1; nonempty = 1; } \ 141 | END { if (nonempty) { for (i in items) print i; }; } \ 142 | ' 143 | # Make sure the list of sources is unique. This is necessary because, 144 | # e.g., the same source file might be shared among _SOURCES variables 145 | # for different programs/libraries. 146 | am__define_uniq_tagged_files = \ 147 | list='$(am__tagged_files)'; \ 148 | unique=`for i in $$list; do \ 149 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 150 | done | $(am__uniquify_input)` 151 | ETAGS = etags 152 | CTAGS = ctags 153 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 154 | ACLOCAL = ${SHELL} /home/gaoyang/mm/missing aclocal-1.14 155 | AMTAR = $${TAR-tar} 156 | AM_DEFAULT_VERBOSITY = 1 157 | AUTOCONF = ${SHELL} /home/gaoyang/mm/missing autoconf 158 | AUTOHEADER = ${SHELL} /home/gaoyang/mm/missing autoheader 159 | AUTOMAKE = ${SHELL} /home/gaoyang/mm/missing automake-1.14 160 | AWK = mawk 161 | CC = gcc 162 | CCDEPMODE = depmode=gcc3 163 | CFLAGS = -g -O2 164 | CPPFLAGS = 165 | CYGPATH_W = echo 166 | DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"appexp\" -DVERSION=\"0.1.00\" 167 | DEPDIR = .deps 168 | ECHO_C = 169 | ECHO_N = -n 170 | ECHO_T = 171 | EXEEXT = 172 | INSTALL = /usr/bin/install -c 173 | INSTALL_DATA = ${INSTALL} -m 644 174 | INSTALL_PROGRAM = ${INSTALL} 175 | INSTALL_SCRIPT = ${INSTALL} 176 | INSTALL_STRIP_PROGRAM = $(install_sh) -c -s 177 | LDFLAGS = 178 | LIBOBJS = 179 | LIBS = 180 | LTLIBOBJS = 181 | MAKEINFO = ${SHELL} /home/gaoyang/mm/missing makeinfo 182 | MKDIR_P = /bin/mkdir -p 183 | OBJEXT = o 184 | PACKAGE = appexp 185 | PACKAGE_BUGREPORT = 186 | PACKAGE_NAME = 187 | PACKAGE_STRING = 188 | PACKAGE_TARNAME = 189 | PACKAGE_URL = 190 | PACKAGE_VERSION = 191 | PATH_SEPARATOR = : 192 | RANLIB = ranlib 193 | SET_MAKE = 194 | SHELL = /bin/bash 195 | STRIP = 196 | VERSION = 0.1.00 197 | abs_builddir = /home/gaoyang/mm/test 198 | abs_srcdir = /home/gaoyang/mm/test 199 | abs_top_builddir = /home/gaoyang/mm 200 | abs_top_srcdir = /home/gaoyang/mm 201 | ac_ct_CC = gcc 202 | am__include = include 203 | am__leading_dot = . 204 | am__quote = 205 | am__tar = $${TAR-tar} chof - "$$tardir" 206 | am__untar = $${TAR-tar} xf - 207 | bindir = ${exec_prefix}/bin 208 | build_alias = 209 | builddir = . 210 | datadir = ${datarootdir} 211 | datarootdir = ${prefix}/share 212 | docdir = ${datarootdir}/doc/${PACKAGE} 213 | dvidir = ${docdir} 214 | exec_prefix = ${prefix} 215 | host_alias = 216 | htmldir = ${docdir} 217 | includedir = ${prefix}/include 218 | infodir = ${datarootdir}/info 219 | install_sh = ${SHELL} /home/gaoyang/mm/install-sh 220 | libdir = ${exec_prefix}/lib 221 | libexecdir = ${exec_prefix}/libexec 222 | localedir = ${datarootdir}/locale 223 | localstatedir = ${prefix}/var 224 | mandir = ${datarootdir}/man 225 | mkdir_p = $(MKDIR_P) 226 | oldincludedir = /usr/include 227 | pdfdir = ${docdir} 228 | prefix = /usr/local 229 | program_transform_name = s,x,x, 230 | psdir = ${docdir} 231 | sbindir = ${exec_prefix}/sbin 232 | sharedstatedir = ${prefix}/com 233 | srcdir = . 234 | sysconfdir = ${prefix}/etc 235 | target_alias = 236 | top_build_prefix = ../ 237 | top_builddir = .. 238 | top_srcdir = .. 239 | appexp_SOURCES = main_test.c 240 | appexp_LDADD = $(top_builddir)/src/libshmdb.a 241 | appexp_CPPFLAGS = -I $(top_srcdir)/src 242 | all: all-am 243 | 244 | .SUFFIXES: 245 | .SUFFIXES: .c .o .obj 246 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 247 | @for dep in $?; do \ 248 | case '$(am__configure_deps)' in \ 249 | *$$dep*) \ 250 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 251 | && { if test -f $@; then exit 0; else break; fi; }; \ 252 | exit 1;; \ 253 | esac; \ 254 | done; \ 255 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ 256 | $(am__cd) $(top_srcdir) && \ 257 | $(AUTOMAKE) --gnu test/Makefile 258 | .PRECIOUS: Makefile 259 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 260 | @case '$?' in \ 261 | *config.status*) \ 262 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 263 | *) \ 264 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 265 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 266 | esac; 267 | 268 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 269 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 270 | 271 | $(top_srcdir)/configure: $(am__configure_deps) 272 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 273 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 274 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 275 | $(am__aclocal_m4_deps): 276 | install-binPROGRAMS: $(bin_PROGRAMS) 277 | @$(NORMAL_INSTALL) 278 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 279 | if test -n "$$list"; then \ 280 | echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ 281 | $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ 282 | fi; \ 283 | for p in $$list; do echo "$$p $$p"; done | \ 284 | sed 's/$(EXEEXT)$$//' | \ 285 | while read p p1; do if test -f $$p \ 286 | ; then echo "$$p"; echo "$$p"; else :; fi; \ 287 | done | \ 288 | sed -e 'p;s,.*/,,;n;h' \ 289 | -e 's|.*|.|' \ 290 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ 291 | sed 'N;N;N;s,\n, ,g' | \ 292 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ 293 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ 294 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ 295 | else { print "f", $$3 "/" $$4, $$1; } } \ 296 | END { for (d in files) print "f", d, files[d] }' | \ 297 | while read type dir files; do \ 298 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 299 | test -z "$$files" || { \ 300 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ 301 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ 302 | } \ 303 | ; done 304 | 305 | uninstall-binPROGRAMS: 306 | @$(NORMAL_UNINSTALL) 307 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 308 | files=`for p in $$list; do echo "$$p"; done | \ 309 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ 310 | -e 's/$$/$(EXEEXT)/' \ 311 | `; \ 312 | test -n "$$list" || exit 0; \ 313 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ 314 | cd "$(DESTDIR)$(bindir)" && rm -f $$files 315 | 316 | clean-binPROGRAMS: 317 | -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 318 | 319 | appexp$(EXEEXT): $(appexp_OBJECTS) $(appexp_DEPENDENCIES) $(EXTRA_appexp_DEPENDENCIES) 320 | @rm -f appexp$(EXEEXT) 321 | $(AM_V_CCLD)$(LINK) $(appexp_OBJECTS) $(appexp_LDADD) $(LIBS) 322 | 323 | mostlyclean-compile: 324 | -rm -f *.$(OBJEXT) 325 | 326 | distclean-compile: 327 | -rm -f *.tab.c 328 | 329 | include ./$(DEPDIR)/appexp-main_test.Po 330 | 331 | .c.o: 332 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 333 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 334 | # $(AM_V_CC)source='$<' object='$@' libtool=no \ 335 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ 336 | # $(AM_V_CC_no)$(COMPILE) -c -o $@ $< 337 | 338 | .c.obj: 339 | $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 340 | $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 341 | # $(AM_V_CC)source='$<' object='$@' libtool=no \ 342 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ 343 | # $(AM_V_CC_no)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 344 | 345 | appexp-main_test.o: main_test.c 346 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appexp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT appexp-main_test.o -MD -MP -MF $(DEPDIR)/appexp-main_test.Tpo -c -o appexp-main_test.o `test -f 'main_test.c' || echo '$(srcdir)/'`main_test.c 347 | $(AM_V_at)$(am__mv) $(DEPDIR)/appexp-main_test.Tpo $(DEPDIR)/appexp-main_test.Po 348 | # $(AM_V_CC)source='main_test.c' object='appexp-main_test.o' libtool=no \ 349 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ 350 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appexp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o appexp-main_test.o `test -f 'main_test.c' || echo '$(srcdir)/'`main_test.c 351 | 352 | appexp-main_test.obj: main_test.c 353 | $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appexp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT appexp-main_test.obj -MD -MP -MF $(DEPDIR)/appexp-main_test.Tpo -c -o appexp-main_test.obj `if test -f 'main_test.c'; then $(CYGPATH_W) 'main_test.c'; else $(CYGPATH_W) '$(srcdir)/main_test.c'; fi` 354 | $(AM_V_at)$(am__mv) $(DEPDIR)/appexp-main_test.Tpo $(DEPDIR)/appexp-main_test.Po 355 | # $(AM_V_CC)source='main_test.c' object='appexp-main_test.obj' libtool=no \ 356 | # DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ 357 | # $(AM_V_CC_no)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appexp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o appexp-main_test.obj `if test -f 'main_test.c'; then $(CYGPATH_W) 'main_test.c'; else $(CYGPATH_W) '$(srcdir)/main_test.c'; fi` 358 | 359 | ID: $(am__tagged_files) 360 | $(am__define_uniq_tagged_files); mkid -fID $$unique 361 | tags: tags-am 362 | TAGS: tags 363 | 364 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 365 | set x; \ 366 | here=`pwd`; \ 367 | $(am__define_uniq_tagged_files); \ 368 | shift; \ 369 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 370 | test -n "$$unique" || unique=$$empty_fix; \ 371 | if test $$# -gt 0; then \ 372 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 373 | "$$@" $$unique; \ 374 | else \ 375 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 376 | $$unique; \ 377 | fi; \ 378 | fi 379 | ctags: ctags-am 380 | 381 | CTAGS: ctags 382 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 383 | $(am__define_uniq_tagged_files); \ 384 | test -z "$(CTAGS_ARGS)$$unique" \ 385 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 386 | $$unique 387 | 388 | GTAGS: 389 | here=`$(am__cd) $(top_builddir) && pwd` \ 390 | && $(am__cd) $(top_srcdir) \ 391 | && gtags -i $(GTAGS_ARGS) "$$here" 392 | cscopelist: cscopelist-am 393 | 394 | cscopelist-am: $(am__tagged_files) 395 | list='$(am__tagged_files)'; \ 396 | case "$(srcdir)" in \ 397 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 398 | *) sdir=$(subdir)/$(srcdir) ;; \ 399 | esac; \ 400 | for i in $$list; do \ 401 | if test -f "$$i"; then \ 402 | echo "$(subdir)/$$i"; \ 403 | else \ 404 | echo "$$sdir/$$i"; \ 405 | fi; \ 406 | done >> $(top_builddir)/cscope.files 407 | 408 | distclean-tags: 409 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 410 | 411 | distdir: $(DISTFILES) 412 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 413 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 414 | list='$(DISTFILES)'; \ 415 | dist_files=`for file in $$list; do echo $$file; done | \ 416 | sed -e "s|^$$srcdirstrip/||;t" \ 417 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 418 | case $$dist_files in \ 419 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 420 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 421 | sort -u` ;; \ 422 | esac; \ 423 | for file in $$dist_files; do \ 424 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 425 | if test -d $$d/$$file; then \ 426 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 427 | if test -d "$(distdir)/$$file"; then \ 428 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 429 | fi; \ 430 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 431 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 432 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 433 | fi; \ 434 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 435 | else \ 436 | test -f "$(distdir)/$$file" \ 437 | || cp -p $$d/$$file "$(distdir)/$$file" \ 438 | || exit 1; \ 439 | fi; \ 440 | done 441 | check-am: all-am 442 | check: check-am 443 | all-am: Makefile $(PROGRAMS) 444 | installdirs: 445 | for dir in "$(DESTDIR)$(bindir)"; do \ 446 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 447 | done 448 | install: install-am 449 | install-exec: install-exec-am 450 | install-data: install-data-am 451 | uninstall: uninstall-am 452 | 453 | install-am: all-am 454 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 455 | 456 | installcheck: installcheck-am 457 | install-strip: 458 | if test -z '$(STRIP)'; then \ 459 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 460 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 461 | install; \ 462 | else \ 463 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 464 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 465 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 466 | fi 467 | mostlyclean-generic: 468 | 469 | clean-generic: 470 | 471 | distclean-generic: 472 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 473 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 474 | 475 | maintainer-clean-generic: 476 | @echo "This command is intended for maintainers to use" 477 | @echo "it deletes files that may require special tools to rebuild." 478 | clean: clean-am 479 | 480 | clean-am: clean-binPROGRAMS clean-generic mostlyclean-am 481 | 482 | distclean: distclean-am 483 | -rm -rf ./$(DEPDIR) 484 | -rm -f Makefile 485 | distclean-am: clean-am distclean-compile distclean-generic \ 486 | distclean-tags 487 | 488 | dvi: dvi-am 489 | 490 | dvi-am: 491 | 492 | html: html-am 493 | 494 | html-am: 495 | 496 | info: info-am 497 | 498 | info-am: 499 | 500 | install-data-am: 501 | 502 | install-dvi: install-dvi-am 503 | 504 | install-dvi-am: 505 | 506 | install-exec-am: install-binPROGRAMS 507 | 508 | install-html: install-html-am 509 | 510 | install-html-am: 511 | 512 | install-info: install-info-am 513 | 514 | install-info-am: 515 | 516 | install-man: 517 | 518 | install-pdf: install-pdf-am 519 | 520 | install-pdf-am: 521 | 522 | install-ps: install-ps-am 523 | 524 | install-ps-am: 525 | 526 | installcheck-am: 527 | 528 | maintainer-clean: maintainer-clean-am 529 | -rm -rf ./$(DEPDIR) 530 | -rm -f Makefile 531 | maintainer-clean-am: distclean-am maintainer-clean-generic 532 | 533 | mostlyclean: mostlyclean-am 534 | 535 | mostlyclean-am: mostlyclean-compile mostlyclean-generic 536 | 537 | pdf: pdf-am 538 | 539 | pdf-am: 540 | 541 | ps: ps-am 542 | 543 | ps-am: 544 | 545 | uninstall-am: uninstall-binPROGRAMS 546 | 547 | .MAKE: install-am install-strip 548 | 549 | .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ 550 | clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ 551 | distclean distclean-compile distclean-generic distclean-tags \ 552 | distdir dvi dvi-am html html-am info info-am install \ 553 | install-am install-binPROGRAMS install-data install-data-am \ 554 | install-dvi install-dvi-am install-exec install-exec-am \ 555 | install-html install-html-am install-info install-info-am \ 556 | install-man install-pdf install-pdf-am install-ps \ 557 | install-ps-am install-strip installcheck installcheck-am \ 558 | installdirs maintainer-clean maintainer-clean-generic \ 559 | mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ 560 | ps ps-am tags tags-am uninstall uninstall-am \ 561 | uninstall-binPROGRAMS 562 | 563 | 564 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 565 | # Otherwise a system limit (for SysV at least) may be exceeded. 566 | .NOEXPORT: 567 | -------------------------------------------------------------------------------- /extenal/shmdb/test/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS = appexp 2 | appexp_SOURCES = main_test.c 3 | appexp_LDADD = $(top_builddir)/src/libshmdb.a 4 | appexp_CPPFLAGS = -I $(top_srcdir)/src 5 | 6 | -------------------------------------------------------------------------------- /extenal/shmdb/test/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.14.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | 17 | VPATH = @srcdir@ 18 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 19 | am__make_running_with_option = \ 20 | case $${target_option-} in \ 21 | ?) ;; \ 22 | *) echo "am__make_running_with_option: internal error: invalid" \ 23 | "target option '$${target_option-}' specified" >&2; \ 24 | exit 1;; \ 25 | esac; \ 26 | has_opt=no; \ 27 | sane_makeflags=$$MAKEFLAGS; \ 28 | if $(am__is_gnu_make); then \ 29 | sane_makeflags=$$MFLAGS; \ 30 | else \ 31 | case $$MAKEFLAGS in \ 32 | *\\[\ \ ]*) \ 33 | bs=\\; \ 34 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 35 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 36 | esac; \ 37 | fi; \ 38 | skip_next=no; \ 39 | strip_trailopt () \ 40 | { \ 41 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 42 | }; \ 43 | for flg in $$sane_makeflags; do \ 44 | test $$skip_next = yes && { skip_next=no; continue; }; \ 45 | case $$flg in \ 46 | *=*|--*) continue;; \ 47 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 48 | -*I?*) strip_trailopt 'I';; \ 49 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 50 | -*O?*) strip_trailopt 'O';; \ 51 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 52 | -*l?*) strip_trailopt 'l';; \ 53 | -[dEDm]) skip_next=yes;; \ 54 | -[JT]) skip_next=yes;; \ 55 | esac; \ 56 | case $$flg in \ 57 | *$$target_option*) has_opt=yes; break;; \ 58 | esac; \ 59 | done; \ 60 | test $$has_opt = yes 61 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 62 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 63 | pkgdatadir = $(datadir)/@PACKAGE@ 64 | pkgincludedir = $(includedir)/@PACKAGE@ 65 | pkglibdir = $(libdir)/@PACKAGE@ 66 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 67 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 68 | install_sh_DATA = $(install_sh) -c -m 644 69 | install_sh_PROGRAM = $(install_sh) -c 70 | install_sh_SCRIPT = $(install_sh) -c 71 | INSTALL_HEADER = $(INSTALL_DATA) 72 | transform = $(program_transform_name) 73 | NORMAL_INSTALL = : 74 | PRE_INSTALL = : 75 | POST_INSTALL = : 76 | NORMAL_UNINSTALL = : 77 | PRE_UNINSTALL = : 78 | POST_UNINSTALL = : 79 | bin_PROGRAMS = appexp$(EXEEXT) 80 | subdir = test 81 | DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ 82 | $(top_srcdir)/depcomp 83 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 84 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 85 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 86 | $(ACLOCAL_M4) 87 | mkinstalldirs = $(install_sh) -d 88 | CONFIG_CLEAN_FILES = 89 | CONFIG_CLEAN_VPATH_FILES = 90 | am__installdirs = "$(DESTDIR)$(bindir)" 91 | PROGRAMS = $(bin_PROGRAMS) 92 | am_appexp_OBJECTS = appexp-main_test.$(OBJEXT) 93 | appexp_OBJECTS = $(am_appexp_OBJECTS) 94 | appexp_DEPENDENCIES = $(top_builddir)/src/libshmdb.a 95 | AM_V_P = $(am__v_P_@AM_V@) 96 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) 97 | am__v_P_0 = false 98 | am__v_P_1 = : 99 | AM_V_GEN = $(am__v_GEN_@AM_V@) 100 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 101 | am__v_GEN_0 = @echo " GEN " $@; 102 | am__v_GEN_1 = 103 | AM_V_at = $(am__v_at_@AM_V@) 104 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 105 | am__v_at_0 = @ 106 | am__v_at_1 = 107 | DEFAULT_INCLUDES = -I.@am__isrc@ 108 | depcomp = $(SHELL) $(top_srcdir)/depcomp 109 | am__depfiles_maybe = depfiles 110 | am__mv = mv -f 111 | AM_V_lt = $(am__v_lt_@AM_V@) 112 | am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) 113 | am__v_lt_0 = --silent 114 | am__v_lt_1 = 115 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 116 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 117 | AM_V_CC = $(am__v_CC_@AM_V@) 118 | am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) 119 | am__v_CC_0 = @echo " CC " $@; 120 | am__v_CC_1 = 121 | CCLD = $(CC) 122 | LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ 123 | AM_V_CCLD = $(am__v_CCLD_@AM_V@) 124 | am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) 125 | am__v_CCLD_0 = @echo " CCLD " $@; 126 | am__v_CCLD_1 = 127 | SOURCES = $(appexp_SOURCES) 128 | DIST_SOURCES = $(appexp_SOURCES) 129 | am__can_run_installinfo = \ 130 | case $$AM_UPDATE_INFO_DIR in \ 131 | n|no|NO) false;; \ 132 | *) (install-info --version) >/dev/null 2>&1;; \ 133 | esac 134 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 135 | # Read a list of newline-separated strings from the standard input, 136 | # and print each of them once, without duplicates. Input order is 137 | # *not* preserved. 138 | am__uniquify_input = $(AWK) '\ 139 | BEGIN { nonempty = 0; } \ 140 | { items[$$0] = 1; nonempty = 1; } \ 141 | END { if (nonempty) { for (i in items) print i; }; } \ 142 | ' 143 | # Make sure the list of sources is unique. This is necessary because, 144 | # e.g., the same source file might be shared among _SOURCES variables 145 | # for different programs/libraries. 146 | am__define_uniq_tagged_files = \ 147 | list='$(am__tagged_files)'; \ 148 | unique=`for i in $$list; do \ 149 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ 150 | done | $(am__uniquify_input)` 151 | ETAGS = etags 152 | CTAGS = ctags 153 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 154 | ACLOCAL = @ACLOCAL@ 155 | AMTAR = @AMTAR@ 156 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 157 | AUTOCONF = @AUTOCONF@ 158 | AUTOHEADER = @AUTOHEADER@ 159 | AUTOMAKE = @AUTOMAKE@ 160 | AWK = @AWK@ 161 | CC = @CC@ 162 | CCDEPMODE = @CCDEPMODE@ 163 | CFLAGS = @CFLAGS@ 164 | CPPFLAGS = @CPPFLAGS@ 165 | CYGPATH_W = @CYGPATH_W@ 166 | DEFS = @DEFS@ 167 | DEPDIR = @DEPDIR@ 168 | ECHO_C = @ECHO_C@ 169 | ECHO_N = @ECHO_N@ 170 | ECHO_T = @ECHO_T@ 171 | EXEEXT = @EXEEXT@ 172 | INSTALL = @INSTALL@ 173 | INSTALL_DATA = @INSTALL_DATA@ 174 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 175 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 176 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 177 | LDFLAGS = @LDFLAGS@ 178 | LIBOBJS = @LIBOBJS@ 179 | LIBS = @LIBS@ 180 | LTLIBOBJS = @LTLIBOBJS@ 181 | MAKEINFO = @MAKEINFO@ 182 | MKDIR_P = @MKDIR_P@ 183 | OBJEXT = @OBJEXT@ 184 | PACKAGE = @PACKAGE@ 185 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 186 | PACKAGE_NAME = @PACKAGE_NAME@ 187 | PACKAGE_STRING = @PACKAGE_STRING@ 188 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 189 | PACKAGE_URL = @PACKAGE_URL@ 190 | PACKAGE_VERSION = @PACKAGE_VERSION@ 191 | PATH_SEPARATOR = @PATH_SEPARATOR@ 192 | RANLIB = @RANLIB@ 193 | SET_MAKE = @SET_MAKE@ 194 | SHELL = @SHELL@ 195 | STRIP = @STRIP@ 196 | VERSION = @VERSION@ 197 | abs_builddir = @abs_builddir@ 198 | abs_srcdir = @abs_srcdir@ 199 | abs_top_builddir = @abs_top_builddir@ 200 | abs_top_srcdir = @abs_top_srcdir@ 201 | ac_ct_CC = @ac_ct_CC@ 202 | am__include = @am__include@ 203 | am__leading_dot = @am__leading_dot@ 204 | am__quote = @am__quote@ 205 | am__tar = @am__tar@ 206 | am__untar = @am__untar@ 207 | bindir = @bindir@ 208 | build_alias = @build_alias@ 209 | builddir = @builddir@ 210 | datadir = @datadir@ 211 | datarootdir = @datarootdir@ 212 | docdir = @docdir@ 213 | dvidir = @dvidir@ 214 | exec_prefix = @exec_prefix@ 215 | host_alias = @host_alias@ 216 | htmldir = @htmldir@ 217 | includedir = @includedir@ 218 | infodir = @infodir@ 219 | install_sh = @install_sh@ 220 | libdir = @libdir@ 221 | libexecdir = @libexecdir@ 222 | localedir = @localedir@ 223 | localstatedir = @localstatedir@ 224 | mandir = @mandir@ 225 | mkdir_p = @mkdir_p@ 226 | oldincludedir = @oldincludedir@ 227 | pdfdir = @pdfdir@ 228 | prefix = @prefix@ 229 | program_transform_name = @program_transform_name@ 230 | psdir = @psdir@ 231 | sbindir = @sbindir@ 232 | sharedstatedir = @sharedstatedir@ 233 | srcdir = @srcdir@ 234 | sysconfdir = @sysconfdir@ 235 | target_alias = @target_alias@ 236 | top_build_prefix = @top_build_prefix@ 237 | top_builddir = @top_builddir@ 238 | top_srcdir = @top_srcdir@ 239 | appexp_SOURCES = main_test.c 240 | appexp_LDADD = $(top_builddir)/src/libshmdb.a 241 | appexp_CPPFLAGS = -I $(top_srcdir)/src 242 | all: all-am 243 | 244 | .SUFFIXES: 245 | .SUFFIXES: .c .o .obj 246 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) 247 | @for dep in $?; do \ 248 | case '$(am__configure_deps)' in \ 249 | *$$dep*) \ 250 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 251 | && { if test -f $@; then exit 0; else break; fi; }; \ 252 | exit 1;; \ 253 | esac; \ 254 | done; \ 255 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile'; \ 256 | $(am__cd) $(top_srcdir) && \ 257 | $(AUTOMAKE) --gnu test/Makefile 258 | .PRECIOUS: Makefile 259 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 260 | @case '$?' in \ 261 | *config.status*) \ 262 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 263 | *) \ 264 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 265 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 266 | esac; 267 | 268 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 269 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 270 | 271 | $(top_srcdir)/configure: $(am__configure_deps) 272 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 273 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) 274 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 275 | $(am__aclocal_m4_deps): 276 | install-binPROGRAMS: $(bin_PROGRAMS) 277 | @$(NORMAL_INSTALL) 278 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 279 | if test -n "$$list"; then \ 280 | echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ 281 | $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ 282 | fi; \ 283 | for p in $$list; do echo "$$p $$p"; done | \ 284 | sed 's/$(EXEEXT)$$//' | \ 285 | while read p p1; do if test -f $$p \ 286 | ; then echo "$$p"; echo "$$p"; else :; fi; \ 287 | done | \ 288 | sed -e 'p;s,.*/,,;n;h' \ 289 | -e 's|.*|.|' \ 290 | -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ 291 | sed 'N;N;N;s,\n, ,g' | \ 292 | $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ 293 | { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ 294 | if ($$2 == $$4) files[d] = files[d] " " $$1; \ 295 | else { print "f", $$3 "/" $$4, $$1; } } \ 296 | END { for (d in files) print "f", d, files[d] }' | \ 297 | while read type dir files; do \ 298 | if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ 299 | test -z "$$files" || { \ 300 | echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ 301 | $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ 302 | } \ 303 | ; done 304 | 305 | uninstall-binPROGRAMS: 306 | @$(NORMAL_UNINSTALL) 307 | @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ 308 | files=`for p in $$list; do echo "$$p"; done | \ 309 | sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ 310 | -e 's/$$/$(EXEEXT)/' \ 311 | `; \ 312 | test -n "$$list" || exit 0; \ 313 | echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ 314 | cd "$(DESTDIR)$(bindir)" && rm -f $$files 315 | 316 | clean-binPROGRAMS: 317 | -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) 318 | 319 | appexp$(EXEEXT): $(appexp_OBJECTS) $(appexp_DEPENDENCIES) $(EXTRA_appexp_DEPENDENCIES) 320 | @rm -f appexp$(EXEEXT) 321 | $(AM_V_CCLD)$(LINK) $(appexp_OBJECTS) $(appexp_LDADD) $(LIBS) 322 | 323 | mostlyclean-compile: 324 | -rm -f *.$(OBJEXT) 325 | 326 | distclean-compile: 327 | -rm -f *.tab.c 328 | 329 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appexp-main_test.Po@am__quote@ 330 | 331 | .c.o: 332 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< 333 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 334 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 335 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 336 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< 337 | 338 | .c.obj: 339 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` 340 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po 341 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ 342 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 343 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` 344 | 345 | appexp-main_test.o: main_test.c 346 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appexp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT appexp-main_test.o -MD -MP -MF $(DEPDIR)/appexp-main_test.Tpo -c -o appexp-main_test.o `test -f 'main_test.c' || echo '$(srcdir)/'`main_test.c 347 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/appexp-main_test.Tpo $(DEPDIR)/appexp-main_test.Po 348 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main_test.c' object='appexp-main_test.o' libtool=no @AMDEPBACKSLASH@ 349 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 350 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appexp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o appexp-main_test.o `test -f 'main_test.c' || echo '$(srcdir)/'`main_test.c 351 | 352 | appexp-main_test.obj: main_test.c 353 | @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appexp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT appexp-main_test.obj -MD -MP -MF $(DEPDIR)/appexp-main_test.Tpo -c -o appexp-main_test.obj `if test -f 'main_test.c'; then $(CYGPATH_W) 'main_test.c'; else $(CYGPATH_W) '$(srcdir)/main_test.c'; fi` 354 | @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/appexp-main_test.Tpo $(DEPDIR)/appexp-main_test.Po 355 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main_test.c' object='appexp-main_test.obj' libtool=no @AMDEPBACKSLASH@ 356 | @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 357 | @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(appexp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o appexp-main_test.obj `if test -f 'main_test.c'; then $(CYGPATH_W) 'main_test.c'; else $(CYGPATH_W) '$(srcdir)/main_test.c'; fi` 358 | 359 | ID: $(am__tagged_files) 360 | $(am__define_uniq_tagged_files); mkid -fID $$unique 361 | tags: tags-am 362 | TAGS: tags 363 | 364 | tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 365 | set x; \ 366 | here=`pwd`; \ 367 | $(am__define_uniq_tagged_files); \ 368 | shift; \ 369 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ 370 | test -n "$$unique" || unique=$$empty_fix; \ 371 | if test $$# -gt 0; then \ 372 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 373 | "$$@" $$unique; \ 374 | else \ 375 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ 376 | $$unique; \ 377 | fi; \ 378 | fi 379 | ctags: ctags-am 380 | 381 | CTAGS: ctags 382 | ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 383 | $(am__define_uniq_tagged_files); \ 384 | test -z "$(CTAGS_ARGS)$$unique" \ 385 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ 386 | $$unique 387 | 388 | GTAGS: 389 | here=`$(am__cd) $(top_builddir) && pwd` \ 390 | && $(am__cd) $(top_srcdir) \ 391 | && gtags -i $(GTAGS_ARGS) "$$here" 392 | cscopelist: cscopelist-am 393 | 394 | cscopelist-am: $(am__tagged_files) 395 | list='$(am__tagged_files)'; \ 396 | case "$(srcdir)" in \ 397 | [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ 398 | *) sdir=$(subdir)/$(srcdir) ;; \ 399 | esac; \ 400 | for i in $$list; do \ 401 | if test -f "$$i"; then \ 402 | echo "$(subdir)/$$i"; \ 403 | else \ 404 | echo "$$sdir/$$i"; \ 405 | fi; \ 406 | done >> $(top_builddir)/cscope.files 407 | 408 | distclean-tags: 409 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags 410 | 411 | distdir: $(DISTFILES) 412 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 413 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 414 | list='$(DISTFILES)'; \ 415 | dist_files=`for file in $$list; do echo $$file; done | \ 416 | sed -e "s|^$$srcdirstrip/||;t" \ 417 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 418 | case $$dist_files in \ 419 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 420 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 421 | sort -u` ;; \ 422 | esac; \ 423 | for file in $$dist_files; do \ 424 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 425 | if test -d $$d/$$file; then \ 426 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 427 | if test -d "$(distdir)/$$file"; then \ 428 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 429 | fi; \ 430 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 431 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 432 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 433 | fi; \ 434 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 435 | else \ 436 | test -f "$(distdir)/$$file" \ 437 | || cp -p $$d/$$file "$(distdir)/$$file" \ 438 | || exit 1; \ 439 | fi; \ 440 | done 441 | check-am: all-am 442 | check: check-am 443 | all-am: Makefile $(PROGRAMS) 444 | installdirs: 445 | for dir in "$(DESTDIR)$(bindir)"; do \ 446 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 447 | done 448 | install: install-am 449 | install-exec: install-exec-am 450 | install-data: install-data-am 451 | uninstall: uninstall-am 452 | 453 | install-am: all-am 454 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 455 | 456 | installcheck: installcheck-am 457 | install-strip: 458 | if test -z '$(STRIP)'; then \ 459 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 460 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 461 | install; \ 462 | else \ 463 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 464 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 465 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 466 | fi 467 | mostlyclean-generic: 468 | 469 | clean-generic: 470 | 471 | distclean-generic: 472 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 473 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 474 | 475 | maintainer-clean-generic: 476 | @echo "This command is intended for maintainers to use" 477 | @echo "it deletes files that may require special tools to rebuild." 478 | clean: clean-am 479 | 480 | clean-am: clean-binPROGRAMS clean-generic mostlyclean-am 481 | 482 | distclean: distclean-am 483 | -rm -rf ./$(DEPDIR) 484 | -rm -f Makefile 485 | distclean-am: clean-am distclean-compile distclean-generic \ 486 | distclean-tags 487 | 488 | dvi: dvi-am 489 | 490 | dvi-am: 491 | 492 | html: html-am 493 | 494 | html-am: 495 | 496 | info: info-am 497 | 498 | info-am: 499 | 500 | install-data-am: 501 | 502 | install-dvi: install-dvi-am 503 | 504 | install-dvi-am: 505 | 506 | install-exec-am: install-binPROGRAMS 507 | 508 | install-html: install-html-am 509 | 510 | install-html-am: 511 | 512 | install-info: install-info-am 513 | 514 | install-info-am: 515 | 516 | install-man: 517 | 518 | install-pdf: install-pdf-am 519 | 520 | install-pdf-am: 521 | 522 | install-ps: install-ps-am 523 | 524 | install-ps-am: 525 | 526 | installcheck-am: 527 | 528 | maintainer-clean: maintainer-clean-am 529 | -rm -rf ./$(DEPDIR) 530 | -rm -f Makefile 531 | maintainer-clean-am: distclean-am maintainer-clean-generic 532 | 533 | mostlyclean: mostlyclean-am 534 | 535 | mostlyclean-am: mostlyclean-compile mostlyclean-generic 536 | 537 | pdf: pdf-am 538 | 539 | pdf-am: 540 | 541 | ps: ps-am 542 | 543 | ps-am: 544 | 545 | uninstall-am: uninstall-binPROGRAMS 546 | 547 | .MAKE: install-am install-strip 548 | 549 | .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ 550 | clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ 551 | distclean distclean-compile distclean-generic distclean-tags \ 552 | distdir dvi dvi-am html html-am info info-am install \ 553 | install-am install-binPROGRAMS install-data install-data-am \ 554 | install-dvi install-dvi-am install-exec install-exec-am \ 555 | install-html install-html-am install-info install-info-am \ 556 | install-man install-pdf install-pdf-am install-ps \ 557 | install-ps-am install-strip installcheck installcheck-am \ 558 | installdirs maintainer-clean maintainer-clean-generic \ 559 | mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ 560 | ps ps-am tags tags-am uninstall uninstall-am \ 561 | uninstall-binPROGRAMS 562 | 563 | 564 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 565 | # Otherwise a system limit (for SysV at least) may be exceeded. 566 | .NOEXPORT: 567 | -------------------------------------------------------------------------------- /extenal/shmdb/test/main_test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "mm.h" 5 | #include "errcode.h" 6 | 7 | int main() 8 | { 9 | STHashShareHandle handle; 10 | int rv = shmdb_initParent(&handle,60); 11 | printf("Created shared memory status:\n"); 12 | 13 | system("ipcs -m"); 14 | if (rv == 0) { 15 | int pid = 0; 16 | printf("return shmid:%d\n",handle.shmid); 17 | if ((pid = fork()) < 0) { 18 | perror("fork error"); 19 | 20 | } else if (pid == 0) { 21 | STHashShareHandle childHandle; 22 | int rvc; 23 | childHandle.shmid = handle.shmid; 24 | childHandle.semid = handle.semid; 25 | system("ipcs -m"); 26 | rvc = shmdb_initChild(&childHandle); 27 | if (rvc == 0) { 28 | const char *key = "key"; 29 | unsigned short keyLen = (unsigned short)(strlen(key)); 30 | const char *value = "value"; 31 | unsigned short valueLen = (unsigned short)(strlen(value)); 32 | printf("init child success\n"); 33 | shmdb_getInfo(&childHandle,NULL); 34 | rvc = shmdb_put(&childHandle,key,keyLen,value,valueLen); 35 | 36 | printf("the result of shmdb_put:%x\n",rvc); 37 | if (rvc == 0) { 38 | char *getValue = NULL; 39 | unsigned short getValueLen = 0; 40 | shmdb_dump(&childHandle,"/tmp/dump.data"); 41 | rvc = shmdb_get(&childHandle,key,keyLen,&getValue,&getValueLen); 42 | printf("the result of shmdb_get:%x\n",rvc); 43 | if (rvc == 0) { 44 | printf("point getValue:0x%x\n getValueLen:%d\n",getValue,getValueLen); 45 | if (getValue != NULL) { 46 | printf("the value is %s\n",getValue); 47 | free(getValue); 48 | getValue = NULL; 49 | } else { 50 | 51 | } 52 | { 53 | char *svalue = "this is new value"; 54 | 55 | rvc = shmdb_put(&childHandle,key,keyLen,svalue,(unsigned short)strlen(svalue)); 56 | if (rvc > 0) { 57 | printf("shmdb_put second error:%x\n",rvc); 58 | return rvc; 59 | } 60 | printf("shmdb_put second success\n"); 61 | shmdb_dump(&childHandle,"/tmp/dump2.data"); 62 | rvc = shmdb_get(&childHandle,key,keyLen,&getValue,&getValueLen); 63 | if (rvc > 0) { 64 | printf("shmdb_get second error:%x\n",rvc); 65 | return rvc; 66 | } 67 | printf("shmdb_get second success\n"); 68 | if (getValue != NULL) { 69 | printf("the second value is :%s\n",getValue); 70 | } else { 71 | free(getValue); 72 | getValue = NULL; 73 | } 74 | rvc = shmdb_delete(&childHandle,key,keyLen,NULL,NULL); 75 | if (rvc > 0) { 76 | printf("shmdb_delete error:%x\n",rvc); 77 | return rvc; 78 | } 79 | rvc = shmdb_get(&childHandle,key,keyLen,&getValue,&getValueLen); 80 | if (rvc == ERROR_NOT_FOUND_INDEX) { 81 | printf("the key:%s has been deleted.\n",key); 82 | } else { 83 | printf("the result of shmdb_get:%x,something is error.\n",rvc); 84 | } 85 | } 86 | 87 | 88 | } 89 | } 90 | } 91 | } else { 92 | int status; 93 | wait(&status); 94 | /* while(1) { 95 | sleep(1); 96 | } */ 97 | shmdb_destroy(&handle); 98 | } 99 | } 100 | return 0; 101 | } -------------------------------------------------------------------------------- /extenal/shmdb/win32_test/test_main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yunnysunny/node-shmdb/ab024f49b1ecbd59c20d49770523a532773bdbdd/extenal/shmdb/win32_test/test_main.cpp -------------------------------------------------------------------------------- /extenal/shmdb/win32_test/win32_test.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {5ADAD7E4-373C-471B-BF8C-5FF21BEFDC3D} 15 | win32_test 16 | 17 | 18 | 19 | Application 20 | true 21 | v110 22 | MultiByte 23 | 24 | 25 | Application 26 | false 27 | v110 28 | true 29 | MultiByte 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | Level3 45 | Disabled 46 | true 47 | 48 | 49 | true 50 | 51 | 52 | 53 | 54 | Level3 55 | MaxSpeed 56 | true 57 | true 58 | true 59 | 60 | 61 | true 62 | true 63 | true 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | {f4316e0c-d450-4e89-ad50-9c204e484531} 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /extenal/shmdb/win32_test/win32_test.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /extenal/shmdb/win32_test_sub/main_test_sub.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yunnysunny/node-shmdb/ab024f49b1ecbd59c20d49770523a532773bdbdd/extenal/shmdb/win32_test_sub/main_test_sub.cpp -------------------------------------------------------------------------------- /extenal/shmdb/win32_test_sub/win32_test_sub.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {2A328B4C-D9E2-433D-B7C0-FE5DDEA7198F} 15 | win32_test_sub 16 | 17 | 18 | 19 | Application 20 | true 21 | v110 22 | MultiByte 23 | 24 | 25 | Application 26 | false 27 | v110 28 | true 29 | MultiByte 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | Level3 45 | Disabled 46 | true 47 | 48 | 49 | true 50 | 51 | 52 | 53 | 54 | Level3 55 | MaxSpeed 56 | true 57 | true 58 | true 59 | 60 | 61 | true 62 | true 63 | true 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | {f4316e0c-d450-4e89-ad50-9c204e484531} 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /extenal/shmdb/win32_test_sub/win32_test_sub.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | var Shmdb = require('./build/Release/shmdb'); 2 | const LOG_LEVEL_MAP = { 3 | 'NONE' :0 , 4 | 'FAULT' :1 , 5 | 'ERROR' :2 , 6 | 'WARN' :3 , 7 | 'INFO' :4 , 8 | 'DEBUG' :5 , 9 | 'TRACE' :6 10 | }; 11 | module.exports = function(param) { 12 | var option = {}; 13 | if (process.env.LOG_LEVEL) { 14 | var logLevel = LOG_LEVEL_MAP[process.env.LOG_LEVEL.toUpperCase()]; 15 | if (logLevel >= 0) { 16 | console.log('log level',logLevel); 17 | option.logLevel = logLevel; 18 | } 19 | } 20 | return new Shmdb(param,option); 21 | }; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shmdb", 3 | "version": "0.3.0", 4 | "keywords": [ 5 | "share memory", 6 | "shmdb", 7 | "multi-process" 8 | ], 9 | "description": "A key/value embedded database aimed at resolving the problem of sharing memory among multi-process.", 10 | "scripts": { 11 | "install": "node-gyp rebuild" 12 | }, 13 | "author": { 14 | "name": "yunnysunny", 15 | "email": "yunnysunny@gmail.com" 16 | }, 17 | "contributors": [ 18 | { 19 | "name": "yunnysunny", 20 | "email": "yunnysunny@gmail.com" 21 | } 22 | ], 23 | "repository": { 24 | "type": "git", 25 | "url": "https://github.com/yunnysunny/node-shmdb.git" 26 | }, 27 | "dependencies": { 28 | "nan": "^2.5.0" 29 | }, 30 | "bugs": { 31 | "url": "https://github.com/yunnysunny/node-shmdb/issues" 32 | }, 33 | "homepage": "https://github.com/yunnysunny/node-shmdb", 34 | "main": "index.js", 35 | "readmeFilename": "readme.md" 36 | } 37 | -------------------------------------------------------------------------------- /readme-cn.md: -------------------------------------------------------------------------------- 1 | # node-shmdb 2 | 3 | ## 背景 4 | 5 | 在进程之间共享数据,有下面几种方式。首先是使用变量。 6 | 7 | 8 | var cluster = require('cluster'); 9 | var a = 1; 10 | if (cluster.isMaster) { 11 | cluster.fork(); 12 | } else if (cluster.isWorker) { 13 | console.log('a is ',a); 14 | } 15 | 在子进程中变量`a`的值是1,但是在子进程或者主进程中给`a`重新赋值时,另一个进程将得不到新赋的值。也就是说这种情况适合变量只读的情况。 16 | 17 | 其次使用事件通知。 18 | 19 | var cluster = require('cluster'); 20 | 21 | if (cluster.isMaster) { 22 | var worker = cluster.fork(); 23 | worker.send('a message form parent'); 24 | worker.on('message', function(msg) {//message send by child 25 | console.log('get a message,its value:',msg); 26 | }); 27 | } else if (cluster.isWorker) { 28 | cluster.worker.send(1); 29 | process.on('message',function(msg) { 30 | console.log(msg); 31 | }); 32 | } 33 | 在node中可以使用函数send来通知其他进程有值要更改。这种情况适合一个进程读,一个进程写的场景。众所周知,node没有锁的设计,那么怎么防止读到脏数据呢?这就是`node-shmdb`要解决的问题。 34 | 35 | ## 原理 36 | `node-shmdb`实现自 一个基于共享内存的项目[shmdb](https://github.com/yunnysunny/shmdb "shmdb project")。`shmdb`是一个key-value类型的数据库,与memcache或者redis不同,它不通过网络建立连接,而是嵌入式的。它使用操作系统的共享内存来在不同进程间共享数据。 37 | 38 | ## 安装 39 | `npm install shmdb` 40 | 41 | ## 示例 42 | 43 | var shmdb = require('shmdb'); 44 | var cluster = require('cluster'); 45 | var obj = null; 46 | 47 | if (cluster.isMaster) { 48 | console.info('=====================I am master====================='); 49 | obj = shmdb(10); 50 | if (obj.rv == 0) { 51 | console.log(obj); 52 | obj.put('some','value1'); 53 | 54 | cluster.fork({shmid:obj.shmid,semid:obj.semid}); 55 | setTimeout(function() { 56 | console.log('get new value changed in child process.',obj.get('some')); 57 | console.log('put value to xx in parent process.',obj.put('xx','parent')); 58 | },2000); 59 | } else { 60 | console.error('get shared memery error:0x[%x]',obj.rv); 61 | } 62 | 63 | } else if (cluster.isWorker) { 64 | console.info('=====================I am child====================='); 65 | var shmid = parseInt(process.env.shmid); 66 | var semid = parseInt(process.env.semid); 67 | if (shmid && semid) { 68 | obj = shmdb({shmid:shmid,semid:semid}); 69 | console.log('get some in child:',obj.get('some')); 70 | console.log('put result in child',obj.put('some','other')); 71 | setTimeout(function() { 72 | console.log('get xx form parent',obj.get('xx')); 73 | },4000); 74 | } 75 | } 76 | 77 | ## API 78 | ### shmdb(param) 79 | 80 | **描述** 81 | 在父进程或者子进程中初始化`shmdb`.返回类 `Shmdb`的实例. 82 | 83 | **参数** 84 | 85 | - {Number|Object} `param` 在父进程中使用Number类型,他将在操作系统中创建共享内存,并且返回两个变量,`shmid`和`semid`,这两个变量将会在子进程中使用。在子进程中使用`Object`类型,他的格式应该为`{shmid:Number,semid:Number}`,`shmid`和`semid`可以从父进程中获取。 86 | 87 | **返回** 88 | 89 | - {Shmdb} 它的属性如下: 90 | 91 | {rv:Number,shmid:Number,semid:Number} 92 | 93 | 如果成功,`rv`值为0,并且`shmid`和`semid`将会被分配值。否则,`rv`值将非零。 94 | 95 | ### Shmdb.prototype.put(key,value) 96 | 97 | **描述** 98 | 99 | 将键值对写入`shmdb`. 100 | 101 | **参数** 102 | 103 | - key {String} 键 104 | - value {String} 值 105 | 106 | **返回** 107 | 108 | - {Object} {code:Number} 成功时`code`为0. 109 | 110 | ### Shmdb.prototype.get(key) 111 | 112 | **描述** 113 | 114 | 根据键获取值. 115 | 116 | **参数** 117 | 118 | - key {String} 键 119 | 120 | **return** 121 | 122 | - {Object} {code:Number,value:String} 成功时`code`为0. 123 | 124 | ### Shmdb.prototype.remove(key) 125 | 126 | **描述** 127 | 128 | 通过键来移除一对键值对. 129 | 130 | **参数** 131 | 132 | - key {String} 键 133 | 134 | **返回** 135 | 136 | {Object} {code:Number,value:String} 成功时`code`为0. 137 | 138 | ### Shmdb.prototype.destroy() 139 | 140 | **描述** 141 | 142 | 销毁通过调用函数`shmdb`分配的共享内存。当进程退出时,这个函数就会自动调用。 143 | 144 | **参数** 145 | 146 | - 空 147 | 148 | **返回** 149 | 150 | - {Object} {code:Number} 成功时`code`为0. 151 | 152 | ## 贡献者 153 | [yunnysunny](https://github.com/yunnysunny) (维护者) 154 | 155 | ## license 156 | [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) 157 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # node-shmdb 2 | 3 | ## why 4 | Shareing the data between parent process and child process,you can servel ways. 5 | First,use variable. 6 | 7 | var cluster = require('cluster'); 8 | var a = 1; 9 | if (cluster.isMaster) { 10 | cluster.fork(); 11 | } else if (cluster.isWorker) { 12 | console.log('a is ',a); 13 | } 14 | Varivale `a` will get the value `1` in child process.But when you assign the value of `a` in one of process, the other process can not get the new value.In other words, it suit for readonly varivale. 15 | 16 | Second,using event message to notify the other process. 17 | 18 | var cluster = require('cluster'); 19 | 20 | if (cluster.isMaster) { 21 | var worker = cluster.fork(); 22 | worker.send('a message form parent'); 23 | worker.on('message', function(msg) {//message send by child 24 | console.log('get a message,its value:',msg); 25 | }); 26 | } else if (cluster.isWorker) { 27 | cluster.worker.send(1); 28 | process.on('message',function(msg) { 29 | console.log(msg); 30 | }); 31 | } 32 | In node,you can use the method of send to notify other process some value has changed.It suit for one process write and the other read. 33 | But while both of two process read and read the same data,how can we deal with it? As we all known,there is no mechanism of lock in node,how to pervent from reading dirty data? `node-shmdb` is just aim at resolving the issue. 34 | 35 | ## theory 36 | `node-shmdb` is an implementation of [shmdb](https://github.com/yunnysunny/shmdb "shmdb project"), which is based on os's shared memory.`shmdb` is a key-value type of database, unlike memcache or redis, it is not a database that connected via network,but it is embeded.For sharing data between processes, it use operation system's shared memeory. 37 | 38 | ## install 39 | 40 | `npm install shmdb` 41 | 42 | ## example 43 | 44 | var shmdb = require('shmdb'); 45 | var cluster = require('cluster'); 46 | var obj = null; 47 | 48 | if (cluster.isMaster) { 49 | console.info('=====================I am master====================='); 50 | obj = shmdb(10); 51 | if (obj.rv == 0) { 52 | console.log(obj); 53 | obj.put('some','value1'); 54 | 55 | cluster.fork({shmid:obj.shmid,semid:obj.semid}); 56 | setTimeout(function() { 57 | console.log('get new value changed in child process.',obj.get('some')); 58 | console.log('put value to xx in parent process.',obj.put('xx','parent')); 59 | },2000); 60 | } else { 61 | console.error('get shared memery error:0x[%x]',obj.rv); 62 | } 63 | 64 | } else if (cluster.isWorker) { 65 | console.info('=====================I am child====================='); 66 | var shmid = parseInt(process.env.shmid); 67 | var semid = parseInt(process.env.semid); 68 | if (shmid && semid) { 69 | obj = shmdb({shmid:shmid,semid:semid}); 70 | console.log('get some in child:',obj.get('some')); 71 | console.log('put result in child',obj.put('some','other')); 72 | setTimeout(function() { 73 | console.log('get xx form parent',obj.get('xx')); 74 | },4000); 75 | } 76 | } 77 | 78 | ## API 79 | 80 | ### shmdb(param) 81 | 82 | **description** 83 | Initializing shmdb in parent process or child process.It return an instance of Class `Shmdb`. 84 | 85 | **parameter** 86 | 87 | - {Number|Object} `param` Using `Number` in parent process,it will create the shared memery in operation system,and return the two variable,`shmid` and `semid`,which will be used in child process.Using `Object` in child process,and its format should be `{shmid:Number,semid:Number}`,the `shmid` and `semid` can be 88 | obtained from parent process. 89 | 90 | **return** 91 | 92 | - {Shmdb} its prototies are as follows: 93 | 94 | {rv:Number,shmid:Number,semid:Number} 95 | 96 | When success,the `rv` will be zero,and `shmid` and `semid` will be assigned.On the other hand,the `rv` will be none-zero. 97 | 98 | ### Shmdb.prototype.put(key,value) 99 | 100 | **description** 101 | 102 | Put a pair of key/value into shmdb. 103 | 104 | **parameter** 105 | 106 | - key {String} the key 107 | - value {String} the value 108 | 109 | **return** 110 | 111 | - {Object} {code:Number} when success the `code` will be zero. 112 | 113 | ### Shmdb.prototype.get(key) 114 | 115 | **decription** 116 | 117 | Get value by key. 118 | 119 | **parameter** 120 | 121 | - key {String} the key 122 | 123 | **return** 124 | 125 | - {Object} {code:Number,value:String} when success the `code` will be zero. 126 | 127 | ### Shmdb.prototype.remove(key) 128 | 129 | **description** 130 | 131 | Remove an pair of key/value by key. 132 | 133 | **parameter** 134 | 135 | - key {String} the key 136 | 137 | **return** 138 | 139 | {Object} {code:Number,value:String} when success the `code` will be zero. 140 | 141 | ### Shmdb.prototype.destroy() 142 | 143 | **description** 144 | 145 | Destory the shared memery allocated when you call the function `shmdb`.When process exit,this function will be called auto. 146 | 147 | **parameter** 148 | 149 | - void 150 | 151 | **return** 152 | 153 | - {Object} {code:Number} when success the `code` will be zero. 154 | 155 | ## contributors 156 | [yunnysunny](https://github.com/yunnysunny) (maintainer) 157 | 158 | ## license 159 | [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) 160 | -------------------------------------------------------------------------------- /test/mutilple_test.bat: -------------------------------------------------------------------------------- 1 | set LOG_LEVEL=info 2 | node test_mutilple_process.js -------------------------------------------------------------------------------- /test/single_test.bat: -------------------------------------------------------------------------------- 1 | set LOG_LEVEL=info 2 | node test_single_process.js -------------------------------------------------------------------------------- /test/test_mutilple_process.js: -------------------------------------------------------------------------------- 1 | var shmdb = require('../index'); 2 | var cluster = require('cluster'); 3 | var obj = null; 4 | 5 | if (cluster.isMaster) { 6 | console.info('=====================I am master====================='); 7 | obj = shmdb(10); 8 | if (obj.rv == 0) { 9 | console.log(obj); 10 | obj.put('some','value1'); 11 | 12 | cluster.fork({shmid:obj.shmid,semid:obj.semid}); 13 | setTimeout(function() { 14 | console.log('get new value changed in child process.',obj.get('some')); 15 | console.log('put value to xx in parent process.',obj.put('xx','parent')); 16 | },2000); 17 | } else { 18 | console.error('get shared memery error:0x[%x]',obj.rv); 19 | } 20 | 21 | } else if (cluster.isWorker) { 22 | console.info('=====================I am child====================='); 23 | var shmid = parseInt(process.env.shmid); 24 | var semid = parseInt(process.env.semid); 25 | if (shmid && semid) { 26 | obj = shmdb({shmid:shmid,semid:semid}); 27 | console.log('get some in child:',obj.get('some')); 28 | console.log('put result in child',obj.put('some','other')); 29 | setTimeout(function() { 30 | console.log('get xx form parent',obj.get('xx')); 31 | },4000); 32 | } 33 | } 34 | 35 | process.on('uncaughtException', function(err) { 36 | console.log(err); 37 | }); -------------------------------------------------------------------------------- /test/test_single_process.js: -------------------------------------------------------------------------------- 1 | var shmdb = require('../index'); 2 | var cluster = require('cluster'); 3 | var obj = shmdb(10); 4 | if (obj.rv == 0) { 5 | console.log('======================='); 6 | console.log('put result',obj.put('key','xxx中文abc')); 7 | console.log('get',obj.get('key')); 8 | console.log('remove',obj.remove('key')); 9 | console.log('get:',obj.get('key')); 10 | obj = null; 11 | var i = 1; 12 | setInterval(function(){ 13 | console.log(i++); 14 | },1000); 15 | } else { 16 | console.error('create shmdb error:['+obj.rv+']'); 17 | } 18 | --------------------------------------------------------------------------------