prestogres 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (393) hide show
  1. data/.gitignore +4 -0
  2. data/Gemfile +2 -0
  3. data/Gemfile.lock +20 -0
  4. data/LICENSE +202 -0
  5. data/NOTICE +22 -0
  6. data/README.md +217 -0
  7. data/Rakefile +13 -0
  8. data/VERSION +1 -0
  9. data/bin/prestogres +254 -0
  10. data/config/pcp.conf.sample +28 -0
  11. data/config/pgpool.conf +678 -0
  12. data/config/pool_hba.conf +84 -0
  13. data/config/pool_passwd +0 -0
  14. data/config/postgresql.conf +2 -0
  15. data/ext/.gitignore +6 -0
  16. data/ext/depend +26 -0
  17. data/ext/extconf.rb +4 -0
  18. data/ext/prestogres_config.c +12 -0
  19. data/pgpool2/.gitignore +36 -0
  20. data/pgpool2/AUTHORS +4 -0
  21. data/pgpool2/COPYING +12 -0
  22. data/pgpool2/ChangeLog +1 -0
  23. data/pgpool2/INSTALL +1 -0
  24. data/pgpool2/Makefile.am +159 -0
  25. data/pgpool2/Makefile.in +1187 -0
  26. data/pgpool2/NEWS +4960 -0
  27. data/pgpool2/README +1 -0
  28. data/pgpool2/README.euc_jp +1 -0
  29. data/pgpool2/README.online-recovery +62 -0
  30. data/pgpool2/TODO +103 -0
  31. data/pgpool2/ac_func_accept_argtypes.m4 +85 -0
  32. data/pgpool2/aclocal.m4 +1088 -0
  33. data/pgpool2/c-compiler.m4 +134 -0
  34. data/pgpool2/c-library.m4 +325 -0
  35. data/pgpool2/child.c +2097 -0
  36. data/pgpool2/config.guess +1532 -0
  37. data/pgpool2/config.h.in +332 -0
  38. data/pgpool2/config.sub +1640 -0
  39. data/pgpool2/configure +15752 -0
  40. data/pgpool2/configure.in +392 -0
  41. data/pgpool2/depcomp +522 -0
  42. data/pgpool2/doc/basebackup.sh +17 -0
  43. data/pgpool2/doc/pgpool-de.html +4220 -0
  44. data/pgpool2/doc/pgpool-en.html +5738 -0
  45. data/pgpool2/doc/pgpool-fr.html +4118 -0
  46. data/pgpool2/doc/pgpool-ja.css +198 -0
  47. data/pgpool2/doc/pgpool-ja.html +11279 -0
  48. data/pgpool2/doc/pgpool-zh_cn.html +4445 -0
  49. data/pgpool2/doc/pgpool.css +280 -0
  50. data/pgpool2/doc/pgpool_remote_start +13 -0
  51. data/pgpool2/doc/recovery.conf.sample +117 -0
  52. data/pgpool2/doc/tutorial-en.html +707 -0
  53. data/pgpool2/doc/tutorial-ja.html +422 -0
  54. data/pgpool2/doc/tutorial-memqcache-en.html +325 -0
  55. data/pgpool2/doc/tutorial-memqcache-ja.html +370 -0
  56. data/pgpool2/doc/tutorial-memqcache-zh_cn.html +322 -0
  57. data/pgpool2/doc/tutorial-watchdog-en.html +306 -0
  58. data/pgpool2/doc/tutorial-watchdog-ja.html +343 -0
  59. data/pgpool2/doc/tutorial-watchdog-zh_cn.html +301 -0
  60. data/pgpool2/doc/tutorial-zh_cn.html +537 -0
  61. data/pgpool2/doc/watchdog.png +0 -0
  62. data/pgpool2/doc/wd-en.html +236 -0
  63. data/pgpool2/doc/wd-en.jpg +0 -0
  64. data/pgpool2/doc/wd-ja.html +219 -0
  65. data/pgpool2/doc/wd-ja.jpg +0 -0
  66. data/pgpool2/doc/wd-zh_cn.html +201 -0
  67. data/pgpool2/doc/where_to_send_queries.odg +0 -0
  68. data/pgpool2/doc/where_to_send_queries.pdf +0 -0
  69. data/pgpool2/general.m4 +166 -0
  70. data/pgpool2/getopt_long.c +200 -0
  71. data/pgpool2/getopt_long.h +44 -0
  72. data/pgpool2/install-sh +251 -0
  73. data/pgpool2/ltmain.sh +8406 -0
  74. data/pgpool2/m4/libtool.m4 +7360 -0
  75. data/pgpool2/m4/ltoptions.m4 +368 -0
  76. data/pgpool2/m4/ltsugar.m4 +123 -0
  77. data/pgpool2/m4/ltversion.m4 +23 -0
  78. data/pgpool2/m4/lt~obsolete.m4 +92 -0
  79. data/pgpool2/main.c +2971 -0
  80. data/pgpool2/md5.c +444 -0
  81. data/pgpool2/md5.h +28 -0
  82. data/pgpool2/missing +360 -0
  83. data/pgpool2/mkinstalldirs +40 -0
  84. data/pgpool2/parser/Makefile.am +50 -0
  85. data/pgpool2/parser/Makefile.in +559 -0
  86. data/pgpool2/parser/copyfuncs.c +3310 -0
  87. data/pgpool2/parser/gram.c +39100 -0
  88. data/pgpool2/parser/gram.h +940 -0
  89. data/pgpool2/parser/gram.y +13408 -0
  90. data/pgpool2/parser/gramparse.h +74 -0
  91. data/pgpool2/parser/keywords.c +32 -0
  92. data/pgpool2/parser/keywords.h +39 -0
  93. data/pgpool2/parser/kwlist.h +425 -0
  94. data/pgpool2/parser/kwlookup.c +88 -0
  95. data/pgpool2/parser/list.c +1156 -0
  96. data/pgpool2/parser/makefuncs.c +518 -0
  97. data/pgpool2/parser/makefuncs.h +83 -0
  98. data/pgpool2/parser/memnodes.h +79 -0
  99. data/pgpool2/parser/nodes.c +29 -0
  100. data/pgpool2/parser/nodes.h +609 -0
  101. data/pgpool2/parser/outfuncs.c +5790 -0
  102. data/pgpool2/parser/parsenodes.h +2615 -0
  103. data/pgpool2/parser/parser.c +262 -0
  104. data/pgpool2/parser/parser.h +46 -0
  105. data/pgpool2/parser/pg_class.h +158 -0
  106. data/pgpool2/parser/pg_config_manual.h +273 -0
  107. data/pgpool2/parser/pg_list.h +352 -0
  108. data/pgpool2/parser/pg_trigger.h +147 -0
  109. data/pgpool2/parser/pg_wchar.h +492 -0
  110. data/pgpool2/parser/pool_memory.c +342 -0
  111. data/pgpool2/parser/pool_memory.h +77 -0
  112. data/pgpool2/parser/pool_parser.h +222 -0
  113. data/pgpool2/parser/pool_string.c +121 -0
  114. data/pgpool2/parser/pool_string.h +37 -0
  115. data/pgpool2/parser/primnodes.h +1280 -0
  116. data/pgpool2/parser/scan.c +4094 -0
  117. data/pgpool2/parser/scan.l +1451 -0
  118. data/pgpool2/parser/scanner.h +120 -0
  119. data/pgpool2/parser/scansup.c +221 -0
  120. data/pgpool2/parser/scansup.h +28 -0
  121. data/pgpool2/parser/snprintf.c +1102 -0
  122. data/pgpool2/parser/stringinfo.c +294 -0
  123. data/pgpool2/parser/stringinfo.h +178 -0
  124. data/pgpool2/parser/value.c +78 -0
  125. data/pgpool2/parser/value.h +62 -0
  126. data/pgpool2/parser/wchar.c +2048 -0
  127. data/pgpool2/pcp.conf.sample +28 -0
  128. data/pgpool2/pcp/Makefile.am +40 -0
  129. data/pgpool2/pcp/Makefile.in +771 -0
  130. data/pgpool2/pcp/libpcp_ext.h +250 -0
  131. data/pgpool2/pcp/md5.c +444 -0
  132. data/pgpool2/pcp/md5.h +28 -0
  133. data/pgpool2/pcp/pcp.c +1652 -0
  134. data/pgpool2/pcp/pcp.h +61 -0
  135. data/pgpool2/pcp/pcp_attach_node.c +172 -0
  136. data/pgpool2/pcp/pcp_detach_node.c +185 -0
  137. data/pgpool2/pcp/pcp_error.c +87 -0
  138. data/pgpool2/pcp/pcp_node_count.c +160 -0
  139. data/pgpool2/pcp/pcp_node_info.c +198 -0
  140. data/pgpool2/pcp/pcp_pool_status.c +166 -0
  141. data/pgpool2/pcp/pcp_proc_count.c +166 -0
  142. data/pgpool2/pcp/pcp_proc_info.c +261 -0
  143. data/pgpool2/pcp/pcp_promote_node.c +185 -0
  144. data/pgpool2/pcp/pcp_recovery_node.c +172 -0
  145. data/pgpool2/pcp/pcp_stop_pgpool.c +179 -0
  146. data/pgpool2/pcp/pcp_stream.c +385 -0
  147. data/pgpool2/pcp/pcp_stream.h +52 -0
  148. data/pgpool2/pcp/pcp_systemdb_info.c +194 -0
  149. data/pgpool2/pcp/pcp_watchdog_info.c +211 -0
  150. data/pgpool2/pcp_child.c +1493 -0
  151. data/pgpool2/pg_md5.c +305 -0
  152. data/pgpool2/pgpool.8.in +121 -0
  153. data/pgpool2/pgpool.conf +553 -0
  154. data/pgpool2/pgpool.conf.sample +666 -0
  155. data/pgpool2/pgpool.conf.sample-master-slave +665 -0
  156. data/pgpool2/pgpool.conf.sample-replication +664 -0
  157. data/pgpool2/pgpool.conf.sample-stream +664 -0
  158. data/pgpool2/pgpool.spec +264 -0
  159. data/pgpool2/pgpool_adm/TODO +7 -0
  160. data/pgpool2/pgpool_adm/pgpool_adm--1.0.sql +85 -0
  161. data/pgpool2/pgpool_adm/pgpool_adm.c +558 -0
  162. data/pgpool2/pgpool_adm/pgpool_adm.control +5 -0
  163. data/pgpool2/pgpool_adm/pgpool_adm.h +46 -0
  164. data/pgpool2/pgpool_adm/pgpool_adm.sql.in +85 -0
  165. data/pgpool2/pool.h +655 -0
  166. data/pgpool2/pool_auth.c +1390 -0
  167. data/pgpool2/pool_config.c +5007 -0
  168. data/pgpool2/pool_config.h +284 -0
  169. data/pgpool2/pool_config.l +3281 -0
  170. data/pgpool2/pool_config_md5.c +29 -0
  171. data/pgpool2/pool_connection_pool.c +812 -0
  172. data/pgpool2/pool_error.c +242 -0
  173. data/pgpool2/pool_globals.c +27 -0
  174. data/pgpool2/pool_hba.c +1723 -0
  175. data/pgpool2/pool_hba.conf.sample +67 -0
  176. data/pgpool2/pool_ip.c +567 -0
  177. data/pgpool2/pool_ip.h +65 -0
  178. data/pgpool2/pool_ipc.h +38 -0
  179. data/pgpool2/pool_lobj.c +242 -0
  180. data/pgpool2/pool_lobj.h +32 -0
  181. data/pgpool2/pool_memqcache.c +3818 -0
  182. data/pgpool2/pool_memqcache.h +268 -0
  183. data/pgpool2/pool_params.c +163 -0
  184. data/pgpool2/pool_passwd.c +249 -0
  185. data/pgpool2/pool_passwd.h +41 -0
  186. data/pgpool2/pool_path.c +193 -0
  187. data/pgpool2/pool_path.h +81 -0
  188. data/pgpool2/pool_process_context.c +247 -0
  189. data/pgpool2/pool_process_context.h +62 -0
  190. data/pgpool2/pool_process_query.c +5001 -0
  191. data/pgpool2/pool_process_reporting.c +1671 -0
  192. data/pgpool2/pool_process_reporting.h +44 -0
  193. data/pgpool2/pool_proto2.c +671 -0
  194. data/pgpool2/pool_proto_modules.c +3524 -0
  195. data/pgpool2/pool_proto_modules.h +185 -0
  196. data/pgpool2/pool_query_cache.c +1020 -0
  197. data/pgpool2/pool_query_context.c +1871 -0
  198. data/pgpool2/pool_query_context.h +105 -0
  199. data/pgpool2/pool_relcache.c +284 -0
  200. data/pgpool2/pool_relcache.h +78 -0
  201. data/pgpool2/pool_rewrite_outfuncs.c +9060 -0
  202. data/pgpool2/pool_rewrite_query.c +715 -0
  203. data/pgpool2/pool_rewrite_query.h +192 -0
  204. data/pgpool2/pool_select_walker.c +1150 -0
  205. data/pgpool2/pool_select_walker.h +68 -0
  206. data/pgpool2/pool_sema.c +161 -0
  207. data/pgpool2/pool_session_context.c +952 -0
  208. data/pgpool2/pool_session_context.h +203 -0
  209. data/pgpool2/pool_shmem.c +185 -0
  210. data/pgpool2/pool_signal.c +158 -0
  211. data/pgpool2/pool_signal.h +61 -0
  212. data/pgpool2/pool_ssl.c +339 -0
  213. data/pgpool2/pool_stream.c +962 -0
  214. data/pgpool2/pool_stream.h +61 -0
  215. data/pgpool2/pool_system.c +659 -0
  216. data/pgpool2/pool_timestamp.c +1215 -0
  217. data/pgpool2/pool_timestamp.h +38 -0
  218. data/pgpool2/pool_type.h +171 -0
  219. data/pgpool2/pool_worker_child.c +384 -0
  220. data/pgpool2/ps_status.c +404 -0
  221. data/pgpool2/recovery.c +435 -0
  222. data/pgpool2/redhat/pgpool.conf.sample.patch +52 -0
  223. data/pgpool2/redhat/pgpool.init +201 -0
  224. data/pgpool2/redhat/pgpool.sysconfig +7 -0
  225. data/pgpool2/redhat/rpm_installer/basebackup-replication.sh +53 -0
  226. data/pgpool2/redhat/rpm_installer/basebackup-stream.sh +55 -0
  227. data/pgpool2/redhat/rpm_installer/config_for_script +17 -0
  228. data/pgpool2/redhat/rpm_installer/failover.sh +64 -0
  229. data/pgpool2/redhat/rpm_installer/getsources.sh +141 -0
  230. data/pgpool2/redhat/rpm_installer/install.sh +1363 -0
  231. data/pgpool2/redhat/rpm_installer/pgpool_recovery_pitr +47 -0
  232. data/pgpool2/redhat/rpm_installer/pgpool_remote_start +15 -0
  233. data/pgpool2/redhat/rpm_installer/recovery.conf +4 -0
  234. data/pgpool2/redhat/rpm_installer/uninstall.sh +57 -0
  235. data/pgpool2/sample/dist_def_pgbench.sql +73 -0
  236. data/pgpool2/sample/pgpool.pam +3 -0
  237. data/pgpool2/sample/pgpool_recovery +20 -0
  238. data/pgpool2/sample/pgpool_recovery_pitr +19 -0
  239. data/pgpool2/sample/pgpool_remote_start +13 -0
  240. data/pgpool2/sample/replicate_def_pgbench.sql +18 -0
  241. data/pgpool2/sql/insert_lock.sql +15 -0
  242. data/pgpool2/sql/pgpool-recovery/pgpool-recovery.c +280 -0
  243. data/pgpool2/sql/pgpool-recovery/pgpool-recovery.sql.in +19 -0
  244. data/pgpool2/sql/pgpool-recovery/pgpool_recovery--1.0.sql +24 -0
  245. data/pgpool2/sql/pgpool-recovery/pgpool_recovery.control +5 -0
  246. data/pgpool2/sql/pgpool-recovery/uninstall_pgpool-recovery.sql +3 -0
  247. data/pgpool2/sql/pgpool-regclass/pgpool-regclass.c +206 -0
  248. data/pgpool2/sql/pgpool-regclass/pgpool-regclass.sql.in +4 -0
  249. data/pgpool2/sql/pgpool-regclass/pgpool_regclass--1.0.sql +7 -0
  250. data/pgpool2/sql/pgpool-regclass/pgpool_regclass.control +5 -0
  251. data/pgpool2/sql/pgpool-regclass/uninstall_pgpool-regclass.sql +1 -0
  252. data/pgpool2/sql/system_db.sql +38 -0
  253. data/pgpool2/strlcpy.c +85 -0
  254. data/pgpool2/test/C/test_extended.c +98 -0
  255. data/pgpool2/test/jdbc/.cvsignore +2 -0
  256. data/pgpool2/test/jdbc/AutoCommitTest.java +45 -0
  257. data/pgpool2/test/jdbc/BatchTest.java +55 -0
  258. data/pgpool2/test/jdbc/ColumnTest.java +60 -0
  259. data/pgpool2/test/jdbc/CreateTempTableTest.java +48 -0
  260. data/pgpool2/test/jdbc/InsertTest.java +34 -0
  261. data/pgpool2/test/jdbc/LockTest.java +36 -0
  262. data/pgpool2/test/jdbc/PgpoolTest.java +75 -0
  263. data/pgpool2/test/jdbc/README.euc_jp +73 -0
  264. data/pgpool2/test/jdbc/RunTest.java +83 -0
  265. data/pgpool2/test/jdbc/SelectTest.java +37 -0
  266. data/pgpool2/test/jdbc/UpdateTest.java +32 -0
  267. data/pgpool2/test/jdbc/expected/CreateTempTable +1 -0
  268. data/pgpool2/test/jdbc/expected/autocommit +10 -0
  269. data/pgpool2/test/jdbc/expected/batch +1 -0
  270. data/pgpool2/test/jdbc/expected/column +100 -0
  271. data/pgpool2/test/jdbc/expected/insert +1 -0
  272. data/pgpool2/test/jdbc/expected/lock +100 -0
  273. data/pgpool2/test/jdbc/expected/select +2 -0
  274. data/pgpool2/test/jdbc/expected/update +1 -0
  275. data/pgpool2/test/jdbc/pgpool.properties +7 -0
  276. data/pgpool2/test/jdbc/prepare.sql +54 -0
  277. data/pgpool2/test/jdbc/run.sh +6 -0
  278. data/pgpool2/test/parser/.cvsignore +6 -0
  279. data/pgpool2/test/parser/README +32 -0
  280. data/pgpool2/test/parser/expected/copy.out +17 -0
  281. data/pgpool2/test/parser/expected/create.out +64 -0
  282. data/pgpool2/test/parser/expected/cursor.out +37 -0
  283. data/pgpool2/test/parser/expected/delete.out +10 -0
  284. data/pgpool2/test/parser/expected/drop.out +12 -0
  285. data/pgpool2/test/parser/expected/insert.out +13 -0
  286. data/pgpool2/test/parser/expected/misc.out +28 -0
  287. data/pgpool2/test/parser/expected/prepare.out +4 -0
  288. data/pgpool2/test/parser/expected/privileges.out +31 -0
  289. data/pgpool2/test/parser/expected/scanner.out +30 -0
  290. data/pgpool2/test/parser/expected/select.out +89 -0
  291. data/pgpool2/test/parser/expected/transaction.out +38 -0
  292. data/pgpool2/test/parser/expected/update.out +11 -0
  293. data/pgpool2/test/parser/expected/v84.out +37 -0
  294. data/pgpool2/test/parser/expected/v90.out +25 -0
  295. data/pgpool2/test/parser/expected/var.out +22 -0
  296. data/pgpool2/test/parser/input/alter.sql +2 -0
  297. data/pgpool2/test/parser/input/copy.sql +17 -0
  298. data/pgpool2/test/parser/input/create.sql +64 -0
  299. data/pgpool2/test/parser/input/cursor.sql +37 -0
  300. data/pgpool2/test/parser/input/delete.sql +10 -0
  301. data/pgpool2/test/parser/input/drop.sql +12 -0
  302. data/pgpool2/test/parser/input/insert.sql +13 -0
  303. data/pgpool2/test/parser/input/misc.sql +28 -0
  304. data/pgpool2/test/parser/input/prepare.sql +4 -0
  305. data/pgpool2/test/parser/input/privileges.sql +31 -0
  306. data/pgpool2/test/parser/input/scanner.sql +34 -0
  307. data/pgpool2/test/parser/input/select.sql +89 -0
  308. data/pgpool2/test/parser/input/transaction.sql +38 -0
  309. data/pgpool2/test/parser/input/update.sql +11 -0
  310. data/pgpool2/test/parser/input/v84.sql +37 -0
  311. data/pgpool2/test/parser/input/v90.sql +38 -0
  312. data/pgpool2/test/parser/input/var.sql +22 -0
  313. data/pgpool2/test/parser/main.c +96 -0
  314. data/pgpool2/test/parser/parse_schedule +16 -0
  315. data/pgpool2/test/parser/pool.h +13 -0
  316. data/pgpool2/test/parser/run-test +62 -0
  317. data/pgpool2/test/pdo-test/README.euc_jp +58 -0
  318. data/pgpool2/test/pdo-test/SQLlist/test1.sql +3 -0
  319. data/pgpool2/test/pdo-test/SQLlist/test2.sql +3 -0
  320. data/pgpool2/test/pdo-test/collections.inc +11 -0
  321. data/pgpool2/test/pdo-test/def.inc +7 -0
  322. data/pgpool2/test/pdo-test/log.txt +0 -0
  323. data/pgpool2/test/pdo-test/mod/database.inc +36 -0
  324. data/pgpool2/test/pdo-test/mod/def.inc +0 -0
  325. data/pgpool2/test/pdo-test/mod/errorhandler.inc +27 -0
  326. data/pgpool2/test/pdo-test/pdotest.php +11 -0
  327. data/pgpool2/test/pdo-test/regsql.inc +56 -0
  328. data/pgpool2/test/pgpool_setup +898 -0
  329. data/pgpool2/test/regression/README +39 -0
  330. data/pgpool2/test/regression/clean.sh +21 -0
  331. data/pgpool2/test/regression/libs.sh +16 -0
  332. data/pgpool2/test/regression/regress.sh +166 -0
  333. data/pgpool2/test/regression/tests/001.load_balance/test.sh +128 -0
  334. data/pgpool2/test/regression/tests/002.native_replication/PgTester.java +47 -0
  335. data/pgpool2/test/regression/tests/002.native_replication/create.sql +6 -0
  336. data/pgpool2/test/regression/tests/002.native_replication/test.sh +71 -0
  337. data/pgpool2/test/regression/tests/003.failover/expected.r +6 -0
  338. data/pgpool2/test/regression/tests/003.failover/expected.s +6 -0
  339. data/pgpool2/test/regression/tests/003.failover/test.sh +45 -0
  340. data/pgpool2/test/regression/tests/004.watchdog/master.conf +12 -0
  341. data/pgpool2/test/regression/tests/004.watchdog/standby.conf +19 -0
  342. data/pgpool2/test/regression/tests/004.watchdog/test.sh +52 -0
  343. data/pgpool2/test/regression/tests/050.bug58/test.sh +50 -0
  344. data/pgpool2/test/regression/tests/051.bug60/bug.sql +12 -0
  345. data/pgpool2/test/regression/tests/051.bug60/database-clean.sql +6 -0
  346. data/pgpool2/test/regression/tests/051.bug60/database-setup.sql +28 -0
  347. data/pgpool2/test/regression/tests/051.bug60/test.sh +79 -0
  348. data/pgpool2/test/regression/tests/052.do_query/test.sh +44 -0
  349. data/pgpool2/test/regression/tests/053.insert_lock_hangs/test.sh +81 -0
  350. data/pgpool2/test/regression/tests/054.postgres_fdw/test.sh +67 -0
  351. data/pgpool2/test/regression/tests/055.backend_all_down/test.sh +52 -0
  352. data/pgpool2/test/regression/tests/056.bug63/jdbctest2.java +66 -0
  353. data/pgpool2/test/regression/tests/056.bug63/test.sh +47 -0
  354. data/pgpool2/test/regression/tests/057.bug61/test.sh +40 -0
  355. data/pgpool2/test/regression/tests/058.bug68/jdbctest3.java +45 -0
  356. data/pgpool2/test/regression/tests/058.bug68/test.sh +47 -0
  357. data/pgpool2/test/timestamp/expected/insert.out +16 -0
  358. data/pgpool2/test/timestamp/expected/misc.out +3 -0
  359. data/pgpool2/test/timestamp/expected/update.out +6 -0
  360. data/pgpool2/test/timestamp/input/insert.sql +16 -0
  361. data/pgpool2/test/timestamp/input/misc.sql +3 -0
  362. data/pgpool2/test/timestamp/input/update.sql +6 -0
  363. data/pgpool2/test/timestamp/main.c +129 -0
  364. data/pgpool2/test/timestamp/parse_schedule +3 -0
  365. data/pgpool2/test/timestamp/run-test +69 -0
  366. data/pgpool2/version.h +1 -0
  367. data/pgpool2/watchdog/Makefile.am +17 -0
  368. data/pgpool2/watchdog/Makefile.in +505 -0
  369. data/pgpool2/watchdog/test/stab.c +266 -0
  370. data/pgpool2/watchdog/test/test.c +85 -0
  371. data/pgpool2/watchdog/test/wd_child_t.c +87 -0
  372. data/pgpool2/watchdog/test/wd_lifecheck_t.c +87 -0
  373. data/pgpool2/watchdog/test/wd_packet_t.c +87 -0
  374. data/pgpool2/watchdog/test/wd_ping_t.c +20 -0
  375. data/pgpool2/watchdog/watchdog.c +408 -0
  376. data/pgpool2/watchdog/watchdog.h +209 -0
  377. data/pgpool2/watchdog/wd_child.c +444 -0
  378. data/pgpool2/watchdog/wd_ext.h +123 -0
  379. data/pgpool2/watchdog/wd_heartbeat.c +577 -0
  380. data/pgpool2/watchdog/wd_if.c +216 -0
  381. data/pgpool2/watchdog/wd_init.c +126 -0
  382. data/pgpool2/watchdog/wd_interlock.c +347 -0
  383. data/pgpool2/watchdog/wd_lifecheck.c +512 -0
  384. data/pgpool2/watchdog/wd_list.c +429 -0
  385. data/pgpool2/watchdog/wd_packet.c +1159 -0
  386. data/pgpool2/watchdog/wd_ping.c +330 -0
  387. data/pgpool2/ylwrap +223 -0
  388. data/pgsql/presto_client.py +346 -0
  389. data/pgsql/prestogres.py +156 -0
  390. data/pgsql/setup_functions.sql +21 -0
  391. data/pgsql/setup_language.sql +3 -0
  392. data/prestogres.gemspec +23 -0
  393. metadata +496 -0
@@ -0,0 +1,368 @@
1
+ # Helper functions for option handling. -*- Autoconf -*-
2
+ #
3
+ # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
4
+ # Written by Gary V. Vaughan, 2004
5
+ #
6
+ # This file is free software; the Free Software Foundation gives
7
+ # unlimited permission to copy and/or distribute it, with or without
8
+ # modifications, as long as this notice is preserved.
9
+
10
+ # serial 6 ltoptions.m4
11
+
12
+ # This is to help aclocal find these macros, as it can't see m4_define.
13
+ AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
14
+
15
+
16
+ # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
17
+ # ------------------------------------------
18
+ m4_define([_LT_MANGLE_OPTION],
19
+ [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
20
+
21
+
22
+ # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
23
+ # ---------------------------------------
24
+ # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
25
+ # matching handler defined, dispatch to it. Other OPTION-NAMEs are
26
+ # saved as a flag.
27
+ m4_define([_LT_SET_OPTION],
28
+ [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
29
+ m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
30
+ _LT_MANGLE_DEFUN([$1], [$2]),
31
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
32
+ ])
33
+
34
+
35
+ # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
36
+ # ------------------------------------------------------------
37
+ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
38
+ m4_define([_LT_IF_OPTION],
39
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
40
+
41
+
42
+ # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
43
+ # -------------------------------------------------------
44
+ # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
45
+ # are set.
46
+ m4_define([_LT_UNLESS_OPTIONS],
47
+ [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
48
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
49
+ [m4_define([$0_found])])])[]dnl
50
+ m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
51
+ ])[]dnl
52
+ ])
53
+
54
+
55
+ # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
56
+ # ----------------------------------------
57
+ # OPTION-LIST is a space-separated list of Libtool options associated
58
+ # with MACRO-NAME. If any OPTION has a matching handler declared with
59
+ # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
60
+ # the unknown option and exit.
61
+ m4_defun([_LT_SET_OPTIONS],
62
+ [# Set options
63
+ m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
64
+ [_LT_SET_OPTION([$1], _LT_Option)])
65
+
66
+ m4_if([$1],[LT_INIT],[
67
+ dnl
68
+ dnl Simply set some default values (i.e off) if boolean options were not
69
+ dnl specified:
70
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
71
+ ])
72
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
73
+ ])
74
+ dnl
75
+ dnl If no reference was made to various pairs of opposing options, then
76
+ dnl we run the default mode handler for the pair. For example, if neither
77
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
78
+ dnl archives by default:
79
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
80
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
81
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
82
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83
+ [_LT_ENABLE_FAST_INSTALL])
84
+ ])
85
+ ])# _LT_SET_OPTIONS
86
+
87
+
88
+ ## --------------------------------- ##
89
+ ## Macros to handle LT_INIT options. ##
90
+ ## --------------------------------- ##
91
+
92
+ # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
93
+ # -----------------------------------------
94
+ m4_define([_LT_MANGLE_DEFUN],
95
+ [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
96
+
97
+
98
+ # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
99
+ # -----------------------------------------------
100
+ m4_define([LT_OPTION_DEFINE],
101
+ [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
102
+ ])# LT_OPTION_DEFINE
103
+
104
+
105
+ # dlopen
106
+ # ------
107
+ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
108
+ ])
109
+
110
+ AU_DEFUN([AC_LIBTOOL_DLOPEN],
111
+ [_LT_SET_OPTION([LT_INIT], [dlopen])
112
+ AC_DIAGNOSE([obsolete],
113
+ [$0: Remove this warning and the call to _LT_SET_OPTION when you
114
+ put the `dlopen' option into LT_INIT's first parameter.])
115
+ ])
116
+
117
+ dnl aclocal-1.4 backwards compatibility:
118
+ dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
119
+
120
+
121
+ # win32-dll
122
+ # ---------
123
+ # Declare package support for building win32 dll's.
124
+ LT_OPTION_DEFINE([LT_INIT], [win32-dll],
125
+ [enable_win32_dll=yes
126
+
127
+ case $host in
128
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
129
+ AC_CHECK_TOOL(AS, as, false)
130
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
131
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
132
+ ;;
133
+ esac
134
+
135
+ test -z "$AS" && AS=as
136
+ _LT_DECL([], [AS], [0], [Assembler program])dnl
137
+
138
+ test -z "$DLLTOOL" && DLLTOOL=dlltool
139
+ _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
140
+
141
+ test -z "$OBJDUMP" && OBJDUMP=objdump
142
+ _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
143
+ ])# win32-dll
144
+
145
+ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
146
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
147
+ _LT_SET_OPTION([LT_INIT], [win32-dll])
148
+ AC_DIAGNOSE([obsolete],
149
+ [$0: Remove this warning and the call to _LT_SET_OPTION when you
150
+ put the `win32-dll' option into LT_INIT's first parameter.])
151
+ ])
152
+
153
+ dnl aclocal-1.4 backwards compatibility:
154
+ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
155
+
156
+
157
+ # _LT_ENABLE_SHARED([DEFAULT])
158
+ # ----------------------------
159
+ # implement the --enable-shared flag, and supports the `shared' and
160
+ # `disable-shared' LT_INIT options.
161
+ # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
162
+ m4_define([_LT_ENABLE_SHARED],
163
+ [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
164
+ AC_ARG_ENABLE([shared],
165
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
166
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
167
+ [p=${PACKAGE-default}
168
+ case $enableval in
169
+ yes) enable_shared=yes ;;
170
+ no) enable_shared=no ;;
171
+ *)
172
+ enable_shared=no
173
+ # Look at the argument we got. We use all the common list separators.
174
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
175
+ for pkg in $enableval; do
176
+ IFS="$lt_save_ifs"
177
+ if test "X$pkg" = "X$p"; then
178
+ enable_shared=yes
179
+ fi
180
+ done
181
+ IFS="$lt_save_ifs"
182
+ ;;
183
+ esac],
184
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
185
+
186
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
187
+ [Whether or not to build shared libraries])
188
+ ])# _LT_ENABLE_SHARED
189
+
190
+ LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
191
+ LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
192
+
193
+ # Old names:
194
+ AC_DEFUN([AC_ENABLE_SHARED],
195
+ [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
196
+ ])
197
+
198
+ AC_DEFUN([AC_DISABLE_SHARED],
199
+ [_LT_SET_OPTION([LT_INIT], [disable-shared])
200
+ ])
201
+
202
+ AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
203
+ AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
204
+
205
+ dnl aclocal-1.4 backwards compatibility:
206
+ dnl AC_DEFUN([AM_ENABLE_SHARED], [])
207
+ dnl AC_DEFUN([AM_DISABLE_SHARED], [])
208
+
209
+
210
+
211
+ # _LT_ENABLE_STATIC([DEFAULT])
212
+ # ----------------------------
213
+ # implement the --enable-static flag, and support the `static' and
214
+ # `disable-static' LT_INIT options.
215
+ # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
216
+ m4_define([_LT_ENABLE_STATIC],
217
+ [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
218
+ AC_ARG_ENABLE([static],
219
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
220
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
221
+ [p=${PACKAGE-default}
222
+ case $enableval in
223
+ yes) enable_static=yes ;;
224
+ no) enable_static=no ;;
225
+ *)
226
+ enable_static=no
227
+ # Look at the argument we got. We use all the common list separators.
228
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
229
+ for pkg in $enableval; do
230
+ IFS="$lt_save_ifs"
231
+ if test "X$pkg" = "X$p"; then
232
+ enable_static=yes
233
+ fi
234
+ done
235
+ IFS="$lt_save_ifs"
236
+ ;;
237
+ esac],
238
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
239
+
240
+ _LT_DECL([build_old_libs], [enable_static], [0],
241
+ [Whether or not to build static libraries])
242
+ ])# _LT_ENABLE_STATIC
243
+
244
+ LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
245
+ LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
246
+
247
+ # Old names:
248
+ AC_DEFUN([AC_ENABLE_STATIC],
249
+ [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
250
+ ])
251
+
252
+ AC_DEFUN([AC_DISABLE_STATIC],
253
+ [_LT_SET_OPTION([LT_INIT], [disable-static])
254
+ ])
255
+
256
+ AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
257
+ AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
258
+
259
+ dnl aclocal-1.4 backwards compatibility:
260
+ dnl AC_DEFUN([AM_ENABLE_STATIC], [])
261
+ dnl AC_DEFUN([AM_DISABLE_STATIC], [])
262
+
263
+
264
+
265
+ # _LT_ENABLE_FAST_INSTALL([DEFAULT])
266
+ # ----------------------------------
267
+ # implement the --enable-fast-install flag, and support the `fast-install'
268
+ # and `disable-fast-install' LT_INIT options.
269
+ # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
270
+ m4_define([_LT_ENABLE_FAST_INSTALL],
271
+ [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
272
+ AC_ARG_ENABLE([fast-install],
273
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
274
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
275
+ [p=${PACKAGE-default}
276
+ case $enableval in
277
+ yes) enable_fast_install=yes ;;
278
+ no) enable_fast_install=no ;;
279
+ *)
280
+ enable_fast_install=no
281
+ # Look at the argument we got. We use all the common list separators.
282
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
283
+ for pkg in $enableval; do
284
+ IFS="$lt_save_ifs"
285
+ if test "X$pkg" = "X$p"; then
286
+ enable_fast_install=yes
287
+ fi
288
+ done
289
+ IFS="$lt_save_ifs"
290
+ ;;
291
+ esac],
292
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
293
+
294
+ _LT_DECL([fast_install], [enable_fast_install], [0],
295
+ [Whether or not to optimize for fast installation])dnl
296
+ ])# _LT_ENABLE_FAST_INSTALL
297
+
298
+ LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
299
+ LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
300
+
301
+ # Old names:
302
+ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
303
+ [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
304
+ AC_DIAGNOSE([obsolete],
305
+ [$0: Remove this warning and the call to _LT_SET_OPTION when you put
306
+ the `fast-install' option into LT_INIT's first parameter.])
307
+ ])
308
+
309
+ AU_DEFUN([AC_DISABLE_FAST_INSTALL],
310
+ [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
311
+ AC_DIAGNOSE([obsolete],
312
+ [$0: Remove this warning and the call to _LT_SET_OPTION when you put
313
+ the `disable-fast-install' option into LT_INIT's first parameter.])
314
+ ])
315
+
316
+ dnl aclocal-1.4 backwards compatibility:
317
+ dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
318
+ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
319
+
320
+
321
+ # _LT_WITH_PIC([MODE])
322
+ # --------------------
323
+ # implement the --with-pic flag, and support the `pic-only' and `no-pic'
324
+ # LT_INIT options.
325
+ # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
326
+ m4_define([_LT_WITH_PIC],
327
+ [AC_ARG_WITH([pic],
328
+ [AS_HELP_STRING([--with-pic],
329
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
330
+ [pic_mode="$withval"],
331
+ [pic_mode=default])
332
+
333
+ test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
334
+
335
+ _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
336
+ ])# _LT_WITH_PIC
337
+
338
+ LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
339
+ LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
340
+
341
+ # Old name:
342
+ AU_DEFUN([AC_LIBTOOL_PICMODE],
343
+ [_LT_SET_OPTION([LT_INIT], [pic-only])
344
+ AC_DIAGNOSE([obsolete],
345
+ [$0: Remove this warning and the call to _LT_SET_OPTION when you
346
+ put the `pic-only' option into LT_INIT's first parameter.])
347
+ ])
348
+
349
+ dnl aclocal-1.4 backwards compatibility:
350
+ dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
351
+
352
+ ## ----------------- ##
353
+ ## LTDL_INIT Options ##
354
+ ## ----------------- ##
355
+
356
+ m4_define([_LTDL_MODE], [])
357
+ LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
358
+ [m4_define([_LTDL_MODE], [nonrecursive])])
359
+ LT_OPTION_DEFINE([LTDL_INIT], [recursive],
360
+ [m4_define([_LTDL_MODE], [recursive])])
361
+ LT_OPTION_DEFINE([LTDL_INIT], [subproject],
362
+ [m4_define([_LTDL_MODE], [subproject])])
363
+
364
+ m4_define([_LTDL_TYPE], [])
365
+ LT_OPTION_DEFINE([LTDL_INIT], [installable],
366
+ [m4_define([_LTDL_TYPE], [installable])])
367
+ LT_OPTION_DEFINE([LTDL_INIT], [convenience],
368
+ [m4_define([_LTDL_TYPE], [convenience])])
@@ -0,0 +1,123 @@
1
+ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
2
+ #
3
+ # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
4
+ # Written by Gary V. Vaughan, 2004
5
+ #
6
+ # This file is free software; the Free Software Foundation gives
7
+ # unlimited permission to copy and/or distribute it, with or without
8
+ # modifications, as long as this notice is preserved.
9
+
10
+ # serial 6 ltsugar.m4
11
+
12
+ # This is to help aclocal find these macros, as it can't see m4_define.
13
+ AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
14
+
15
+
16
+ # lt_join(SEP, ARG1, [ARG2...])
17
+ # -----------------------------
18
+ # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
19
+ # associated separator.
20
+ # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
21
+ # versions in m4sugar had bugs.
22
+ m4_define([lt_join],
23
+ [m4_if([$#], [1], [],
24
+ [$#], [2], [[$2]],
25
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
26
+ m4_define([_lt_join],
27
+ [m4_if([$#$2], [2], [],
28
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
29
+
30
+
31
+ # lt_car(LIST)
32
+ # lt_cdr(LIST)
33
+ # ------------
34
+ # Manipulate m4 lists.
35
+ # These macros are necessary as long as will still need to support
36
+ # Autoconf-2.59 which quotes differently.
37
+ m4_define([lt_car], [[$1]])
38
+ m4_define([lt_cdr],
39
+ [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
40
+ [$#], 1, [],
41
+ [m4_dquote(m4_shift($@))])])
42
+ m4_define([lt_unquote], $1)
43
+
44
+
45
+ # lt_append(MACRO-NAME, STRING, [SEPARATOR])
46
+ # ------------------------------------------
47
+ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
48
+ # Note that neither SEPARATOR nor STRING are expanded; they are appended
49
+ # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
50
+ # No SEPARATOR is output if MACRO-NAME was previously undefined (different
51
+ # than defined and empty).
52
+ #
53
+ # This macro is needed until we can rely on Autoconf 2.62, since earlier
54
+ # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
55
+ m4_define([lt_append],
56
+ [m4_define([$1],
57
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
58
+
59
+
60
+
61
+ # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
62
+ # ----------------------------------------------------------
63
+ # Produce a SEP delimited list of all paired combinations of elements of
64
+ # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
65
+ # has the form PREFIXmINFIXSUFFIXn.
66
+ # Needed until we can rely on m4_combine added in Autoconf 2.62.
67
+ m4_define([lt_combine],
68
+ [m4_if(m4_eval([$# > 3]), [1],
69
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
70
+ [[m4_foreach([_Lt_prefix], [$2],
71
+ [m4_foreach([_Lt_suffix],
72
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
73
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
74
+
75
+
76
+ # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
77
+ # -----------------------------------------------------------------------
78
+ # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
79
+ # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
80
+ m4_define([lt_if_append_uniq],
81
+ [m4_ifdef([$1],
82
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
83
+ [lt_append([$1], [$2], [$3])$4],
84
+ [$5])],
85
+ [lt_append([$1], [$2], [$3])$4])])
86
+
87
+
88
+ # lt_dict_add(DICT, KEY, VALUE)
89
+ # -----------------------------
90
+ m4_define([lt_dict_add],
91
+ [m4_define([$1($2)], [$3])])
92
+
93
+
94
+ # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
95
+ # --------------------------------------------
96
+ m4_define([lt_dict_add_subkey],
97
+ [m4_define([$1($2:$3)], [$4])])
98
+
99
+
100
+ # lt_dict_fetch(DICT, KEY, [SUBKEY])
101
+ # ----------------------------------
102
+ m4_define([lt_dict_fetch],
103
+ [m4_ifval([$3],
104
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
105
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
106
+
107
+
108
+ # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
109
+ # -----------------------------------------------------------------
110
+ m4_define([lt_if_dict_fetch],
111
+ [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
112
+ [$5],
113
+ [$6])])
114
+
115
+
116
+ # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
117
+ # --------------------------------------------------------------
118
+ m4_define([lt_dict_filter],
119
+ [m4_if([$5], [], [],
120
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
121
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
122
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
123
+ ])