├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── README.md ├── build └── .empty ├── conf ├── CMakeLists.txt └── duda.conf.in ├── docs ├── Makefile.in ├── generator ├── html │ ├── assets │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.min.css │ │ │ └── prettify.css │ │ └── js │ │ │ ├── lang-apollo.js │ │ │ ├── lang-clj.js │ │ │ ├── lang-css.js │ │ │ ├── lang-go.js │ │ │ ├── lang-hs.js │ │ │ ├── lang-lisp.js │ │ │ ├── lang-lua.js │ │ │ ├── lang-ml.js │ │ │ ├── lang-n.js │ │ │ ├── lang-proto.js │ │ │ ├── lang-scala.js │ │ │ ├── lang-sql.js │ │ │ ├── lang-tex.js │ │ │ ├── lang-vb.js │ │ │ ├── lang-vhdl.js │ │ │ ├── lang-wiki.js │ │ │ ├── lang-xq.js │ │ │ ├── lang-yaml.js │ │ │ └── prettify.js │ ├── bootstrap.txt │ ├── css │ │ ├── bootstrap-responsive.css │ │ ├── bootstrap-responsive.min.css │ │ ├── bootstrap.css │ │ ├── bootstrap.min.css │ │ └── prettify │ │ │ ├── lang-apollo.js │ │ │ ├── lang-clj.js │ │ │ ├── lang-css.js │ │ │ ├── lang-go.js │ │ │ ├── lang-hs.js │ │ │ ├── lang-lisp.js │ │ │ ├── lang-lua.js │ │ │ ├── lang-ml.js │ │ │ ├── lang-n.js │ │ │ ├── lang-proto.js │ │ │ ├── lang-scala.js │ │ │ ├── lang-sql.js │ │ │ ├── lang-tex.js │ │ │ ├── lang-vb.js │ │ │ ├── lang-vhdl.js │ │ │ ├── lang-wiki.js │ │ │ ├── lang-xq.js │ │ │ ├── lang-yaml.js │ │ │ ├── prettify.css │ │ │ └── prettify.js │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ └── js │ │ ├── bootstrap.js │ │ └── bootstrap.min.js ├── index.doc ├── intro │ └── index.html └── spec.txt ├── include └── duda │ ├── duda.h │ ├── duda_api.h │ ├── duda_body_buffer.h │ ├── duda_bootstrap.h │ ├── duda_conf.h │ ├── duda_debug.h │ ├── duda_event.h │ ├── duda_fconf.h │ ├── duda_gc_map.h │ ├── duda_info.h.in │ ├── duda_lib.h │ ├── duda_objects.h │ ├── duda_old.h │ ├── duda_package.h │ ├── duda_qs_map.h │ ├── duda_queue.h │ ├── duda_router_uri.h │ ├── duda_sendfile.h │ ├── duda_service_internal.h │ ├── duda_stats.h │ ├── duda_stats_proc.h │ ├── duda_utils.h │ ├── duda_version.h.in │ ├── duda_webservice.h │ ├── objects │ ├── duda_console.h │ ├── duda_cookie.h │ ├── duda_data.h │ ├── duda_dthread.h │ ├── duda_dthread_channel.h │ ├── duda_gc.h │ ├── duda_global.h │ ├── duda_log.h │ ├── duda_mem.h │ ├── duda_param.h │ ├── duda_qs.h │ ├── duda_request.h │ ├── duda_response.h │ ├── duda_router.h │ ├── duda_session.h │ ├── duda_worker.h │ └── duda_xtime.h │ └── webservice.h ├── lib ├── CMakeLists.txt ├── duda.c ├── duda_api.c ├── duda_body_buffer.c ├── duda_conf.c ├── duda_debug.c ├── duda_event.c ├── duda_fconf.c ├── duda_old_launcher.c ├── duda_package.c ├── duda_queue.c ├── duda_sendfile.c ├── duda_service.c ├── duda_stats.c ├── duda_utils.c └── objects │ ├── duda_console.c │ ├── duda_cookie.c │ ├── duda_data.c │ ├── duda_dthread.c │ ├── duda_dthread_channel.c │ ├── duda_gc.c │ ├── duda_global.c │ ├── duda_log.c │ ├── duda_mem.c │ ├── duda_param.c │ ├── duda_qs.c │ ├── duda_request.c │ ├── duda_response.c │ ├── duda_router.c │ ├── duda_session.c │ ├── duda_worker.c │ └── duda_xtime.c ├── packages ├── Makefile.in ├── base64 │ ├── Makefile.in │ ├── base64.c │ ├── base64.h │ ├── duda_package.c │ └── index.doc ├── json │ ├── Makefile.in │ ├── cJSON.c │ ├── cJSON.h │ ├── duda_package.c │ ├── index.doc │ └── json.h ├── mariadb │ ├── Makefile.in │ ├── README.md │ ├── async.c │ ├── async.h │ ├── common.h │ ├── connection.c │ ├── connection.h │ ├── connection_priv.h │ ├── deps │ │ └── libmariadbclient │ │ │ ├── CMakeLists.txt │ │ │ ├── COPYING │ │ │ ├── COPYING.LESSER │ │ │ ├── README │ │ │ ├── VERSION │ │ │ ├── cmake │ │ │ ├── abi_check.cmake │ │ │ ├── bison.cmake │ │ │ ├── build_configurations │ │ │ │ └── mysql_release.cmake │ │ │ ├── character_sets.cmake │ │ │ ├── check_minimal_version.cmake │ │ │ ├── cmake_parse_arguments.cmake │ │ │ ├── configurable_file_content.in │ │ │ ├── create_initial_db.cmake.in │ │ │ ├── ctest.cmake │ │ │ ├── do_abi_check.cmake │ │ │ ├── dtrace.cmake │ │ │ ├── dtrace_prelink.cmake │ │ │ ├── info_bin.cmake │ │ │ ├── info_macros.cmake.in │ │ │ ├── info_src.cmake │ │ │ ├── install_layout.cmake │ │ │ ├── install_macros.cmake │ │ │ ├── libutils.cmake │ │ │ ├── maintainer.cmake │ │ │ ├── make_dist.cmake.in │ │ │ ├── merge_archives_unix.cmake.in │ │ │ ├── mysql_add_executable.cmake │ │ │ ├── mysql_version.cmake │ │ │ ├── os │ │ │ │ └── Linux.cmake │ │ │ ├── package_name.cmake │ │ │ ├── ssl.cmake │ │ │ ├── stack_direction.c │ │ │ ├── tags.cmake │ │ │ ├── versioninfo.rc.in │ │ │ └── zlib.cmake │ │ │ ├── config.h.cmake │ │ │ ├── configure.cmake │ │ │ ├── dbug │ │ │ ├── CMakeLists.txt │ │ │ ├── dbug.c │ │ │ ├── factorial.c │ │ │ ├── my_main.c │ │ │ └── tests.c │ │ │ ├── extra │ │ │ ├── CMakeLists.txt │ │ │ ├── comp_err.c │ │ │ ├── innochecksum.c │ │ │ ├── my_print_defaults.c │ │ │ ├── mysql_waitpid.c │ │ │ ├── perror.c │ │ │ ├── replace.c │ │ │ ├── resolve_stack_dump.c │ │ │ ├── resolveip.c │ │ │ └── yassl │ │ │ │ ├── AUTHORS │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── COPYING │ │ │ │ ├── FLOSS-EXCEPTIONS │ │ │ │ ├── INSTALL │ │ │ │ ├── README │ │ │ │ ├── include │ │ │ │ ├── buffer.hpp │ │ │ │ ├── cert_wrapper.hpp │ │ │ │ ├── crypto_wrapper.hpp │ │ │ │ ├── factory.hpp │ │ │ │ ├── handshake.hpp │ │ │ │ ├── lock.hpp │ │ │ │ ├── log.hpp │ │ │ │ ├── openssl │ │ │ │ │ ├── crypto.h │ │ │ │ │ ├── des.h │ │ │ │ │ ├── des_old.h │ │ │ │ │ ├── engine.h │ │ │ │ │ ├── err.h │ │ │ │ │ ├── evp.h │ │ │ │ │ ├── hmac.h │ │ │ │ │ ├── lhash.h │ │ │ │ │ ├── md4.h │ │ │ │ │ ├── md5.h │ │ │ │ │ ├── objects.h │ │ │ │ │ ├── opensslv.h │ │ │ │ │ ├── pem.h │ │ │ │ │ ├── pkcs12.h │ │ │ │ │ ├── prefix_crypto.h │ │ │ │ │ ├── prefix_ssl.h │ │ │ │ │ ├── rand.h │ │ │ │ │ ├── rsa.h │ │ │ │ │ ├── sha.h │ │ │ │ │ ├── ssl.h │ │ │ │ │ ├── x509.h │ │ │ │ │ └── x509v3.h │ │ │ │ ├── socket_wrapper.hpp │ │ │ │ ├── timer.hpp │ │ │ │ ├── yassl.hpp │ │ │ │ ├── yassl_error.hpp │ │ │ │ ├── yassl_imp.hpp │ │ │ │ ├── yassl_int.hpp │ │ │ │ └── yassl_types.hpp │ │ │ │ ├── src │ │ │ │ ├── buffer.cpp │ │ │ │ ├── cert_wrapper.cpp │ │ │ │ ├── crypto_wrapper.cpp │ │ │ │ ├── dummy.cpp │ │ │ │ ├── handshake.cpp │ │ │ │ ├── lock.cpp │ │ │ │ ├── log.cpp │ │ │ │ ├── socket_wrapper.cpp │ │ │ │ ├── ssl.cpp │ │ │ │ ├── template_instnt.cpp │ │ │ │ ├── timer.cpp │ │ │ │ ├── yassl.cpp │ │ │ │ ├── yassl_error.cpp │ │ │ │ ├── yassl_imp.cpp │ │ │ │ └── yassl_int.cpp │ │ │ │ └── taocrypt │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── COPYING │ │ │ │ ├── INSTALL │ │ │ │ ├── README │ │ │ │ ├── include │ │ │ │ ├── aes.hpp │ │ │ │ ├── algebra.hpp │ │ │ │ ├── arc4.hpp │ │ │ │ ├── asn.hpp │ │ │ │ ├── block.hpp │ │ │ │ ├── blowfish.hpp │ │ │ │ ├── coding.hpp │ │ │ │ ├── des.hpp │ │ │ │ ├── dh.hpp │ │ │ │ ├── dsa.hpp │ │ │ │ ├── error.hpp │ │ │ │ ├── file.hpp │ │ │ │ ├── hash.hpp │ │ │ │ ├── hc128.hpp │ │ │ │ ├── hmac.hpp │ │ │ │ ├── integer.hpp │ │ │ │ ├── kernelc.hpp │ │ │ │ ├── md2.hpp │ │ │ │ ├── md4.hpp │ │ │ │ ├── md5.hpp │ │ │ │ ├── misc.hpp │ │ │ │ ├── modarith.hpp │ │ │ │ ├── modes.hpp │ │ │ │ ├── pwdbased.hpp │ │ │ │ ├── rabbit.hpp │ │ │ │ ├── random.hpp │ │ │ │ ├── ripemd.hpp │ │ │ │ ├── rsa.hpp │ │ │ │ ├── runtime.hpp │ │ │ │ ├── sha.hpp │ │ │ │ ├── twofish.hpp │ │ │ │ ├── type_traits.hpp │ │ │ │ └── types.hpp │ │ │ │ ├── mySTL │ │ │ │ ├── algorithm.hpp │ │ │ │ ├── helpers.hpp │ │ │ │ ├── list.hpp │ │ │ │ ├── memory.hpp │ │ │ │ ├── memory_array.hpp │ │ │ │ ├── pair.hpp │ │ │ │ ├── stdexcept.hpp │ │ │ │ └── vector.hpp │ │ │ │ └── src │ │ │ │ ├── aes.cpp │ │ │ │ ├── aestables.cpp │ │ │ │ ├── algebra.cpp │ │ │ │ ├── arc4.cpp │ │ │ │ ├── asn.cpp │ │ │ │ ├── bftables.cpp │ │ │ │ ├── blowfish.cpp │ │ │ │ ├── coding.cpp │ │ │ │ ├── des.cpp │ │ │ │ ├── dh.cpp │ │ │ │ ├── dsa.cpp │ │ │ │ ├── file.cpp │ │ │ │ ├── hash.cpp │ │ │ │ ├── hc128.cpp │ │ │ │ ├── integer.cpp │ │ │ │ ├── md2.cpp │ │ │ │ ├── md4.cpp │ │ │ │ ├── md5.cpp │ │ │ │ ├── misc.cpp │ │ │ │ ├── rabbit.cpp │ │ │ │ ├── random.cpp │ │ │ │ ├── ripemd.cpp │ │ │ │ ├── rsa.cpp │ │ │ │ ├── sha.cpp │ │ │ │ ├── template_instnt.cpp │ │ │ │ ├── tftables.cpp │ │ │ │ └── twofish.cpp │ │ │ ├── include │ │ │ ├── CMakeLists.txt │ │ │ ├── atomic │ │ │ │ ├── gcc_builtins.h │ │ │ │ ├── generic-msvc.h │ │ │ │ ├── nolock.h │ │ │ │ ├── rwlock.h │ │ │ │ ├── solaris.h │ │ │ │ └── x86-gcc.h │ │ │ ├── base64.h │ │ │ ├── decimal.h │ │ │ ├── errmsg.h │ │ │ ├── ft_global.h │ │ │ ├── handler_state.h │ │ │ ├── hash.h │ │ │ ├── heap.h │ │ │ ├── keycache.h │ │ │ ├── lf.h │ │ │ ├── m_ctype.h │ │ │ ├── m_string.h │ │ │ ├── ma_dyncol.h │ │ │ ├── maria.h │ │ │ ├── my_aes.h │ │ │ ├── my_alarm.h │ │ │ ├── my_alloc.h │ │ │ ├── my_atomic.h │ │ │ ├── my_attribute.h │ │ │ ├── my_base.h │ │ │ ├── my_bit.h │ │ │ ├── my_bitmap.h │ │ │ ├── my_compare.h │ │ │ ├── my_compiler.h │ │ │ ├── my_context.h │ │ │ ├── my_dbug.h │ │ │ ├── my_decimal_limits.h │ │ │ ├── my_dir.h │ │ │ ├── my_getopt.h │ │ │ ├── my_global.h │ │ │ ├── my_libwrap.h │ │ │ ├── my_list.h │ │ │ ├── my_md5.h │ │ │ ├── my_net.h │ │ │ ├── my_nosys.h │ │ │ ├── my_pthread.h │ │ │ ├── my_rdtsc.h │ │ │ ├── my_stacktrace.h │ │ │ ├── my_sys.h │ │ │ ├── my_time.h │ │ │ ├── my_tree.h │ │ │ ├── my_uctype.h │ │ │ ├── my_user.h │ │ │ ├── my_valgrind.h │ │ │ ├── my_xml.h │ │ │ ├── myisam.h │ │ │ ├── myisamchk.h │ │ │ ├── myisammrg.h │ │ │ ├── myisampack.h │ │ │ ├── mysql.h │ │ │ ├── mysql.h.pp │ │ │ ├── mysql │ │ │ │ ├── auth_dialog_client.h │ │ │ │ ├── client_plugin.h │ │ │ │ ├── client_plugin.h.pp │ │ │ │ ├── plugin.h │ │ │ │ ├── plugin_audit.h │ │ │ │ ├── plugin_audit.h.pp │ │ │ │ ├── plugin_auth.h │ │ │ │ ├── plugin_auth.h.pp │ │ │ │ ├── plugin_auth_common.h │ │ │ │ ├── plugin_ftparser.h │ │ │ │ ├── plugin_ftparser.h.pp │ │ │ │ ├── psi │ │ │ │ │ ├── mysql_file.h │ │ │ │ │ ├── mysql_thread.h │ │ │ │ │ ├── psi.h │ │ │ │ │ ├── psi_abi_v1.h │ │ │ │ │ ├── psi_abi_v1.h.pp │ │ │ │ │ ├── psi_abi_v2.h │ │ │ │ │ └── psi_abi_v2.h.pp │ │ │ │ ├── service_debug_sync.h │ │ │ │ ├── service_kill_statement.h │ │ │ │ ├── service_my_snprintf.h │ │ │ │ ├── service_progress_report.h │ │ │ │ ├── service_thd_alloc.h │ │ │ │ ├── service_thd_wait.h │ │ │ │ ├── service_thread_scheduler.h │ │ │ │ └── services.h │ │ │ ├── mysql_async.h │ │ │ ├── mysql_com.h │ │ │ ├── mysql_embed.h │ │ │ ├── mysql_time.h │ │ │ ├── mysql_version.h.in │ │ │ ├── mysqld_default_groups.h │ │ │ ├── mysys_err.h │ │ │ ├── password.h │ │ │ ├── probes_mysql.d.base │ │ │ ├── probes_mysql.h │ │ │ ├── probes_mysql_nodtrace.h │ │ │ ├── queues.h │ │ │ ├── rijndael.h │ │ │ ├── service_versions.h │ │ │ ├── sha1.h │ │ │ ├── sha2.h │ │ │ ├── sql_common.h │ │ │ ├── sslopt-case.h │ │ │ ├── sslopt-longopts.h │ │ │ ├── sslopt-vars.h │ │ │ ├── t_ctype.h │ │ │ ├── thr_alarm.h │ │ │ ├── thr_lock.h │ │ │ ├── thread_pool_priv.h │ │ │ ├── typelib.h │ │ │ ├── violite.h │ │ │ ├── waiting_threads.h │ │ │ ├── welcome_copyright_notice.h │ │ │ └── wqueue.h │ │ │ ├── libmysql │ │ │ ├── CMakeLists.txt │ │ │ ├── client_settings.h │ │ │ ├── errmsg.c │ │ │ ├── get_password.c │ │ │ └── libmysql.c │ │ │ ├── mysys │ │ │ ├── CMakeLists.txt │ │ │ ├── array.c │ │ │ ├── base64.c │ │ │ ├── charset-def.c │ │ │ ├── charset.c │ │ │ ├── checksum.c │ │ │ ├── default.c │ │ │ ├── errors.c │ │ │ ├── hash.c │ │ │ ├── lf_alloc-pin.c │ │ │ ├── lf_dynarray.c │ │ │ ├── lf_hash.c │ │ │ ├── list.c │ │ │ ├── ma_dyncol.c │ │ │ ├── md5.c │ │ │ ├── mf_arr_appstr.c │ │ │ ├── mf_cache.c │ │ │ ├── mf_dirname.c │ │ │ ├── mf_fn_ext.c │ │ │ ├── mf_format.c │ │ │ ├── mf_getdate.c │ │ │ ├── mf_iocache.c │ │ │ ├── mf_iocache2.c │ │ │ ├── mf_keycache.c │ │ │ ├── mf_keycaches.c │ │ │ ├── mf_loadpath.c │ │ │ ├── mf_pack.c │ │ │ ├── mf_path.c │ │ │ ├── mf_qsort.c │ │ │ ├── mf_qsort2.c │ │ │ ├── mf_radix.c │ │ │ ├── mf_same.c │ │ │ ├── mf_sort.c │ │ │ ├── mf_soundex.c │ │ │ ├── mf_tempdir.c │ │ │ ├── mf_tempfile.c │ │ │ ├── mf_unixpath.c │ │ │ ├── mf_wcomp.c │ │ │ ├── mulalloc.c │ │ │ ├── my_access.c │ │ │ ├── my_addr_resolve.c │ │ │ ├── my_aes.c │ │ │ ├── my_alarm.c │ │ │ ├── my_alloc.c │ │ │ ├── my_atomic.c │ │ │ ├── my_basename.c │ │ │ ├── my_bit.c │ │ │ ├── my_bitmap.c │ │ │ ├── my_chmod.c │ │ │ ├── my_chsize.c │ │ │ ├── my_compare.c │ │ │ ├── my_compress.c │ │ │ ├── my_context.c │ │ │ ├── my_copy.c │ │ │ ├── my_create.c │ │ │ ├── my_delete.c │ │ │ ├── my_div.c │ │ │ ├── my_error.c │ │ │ ├── my_file.c │ │ │ ├── my_fopen.c │ │ │ ├── my_fstream.c │ │ │ ├── my_gethwaddr.c │ │ │ ├── my_getncpus.c │ │ │ ├── my_getopt.c │ │ │ ├── my_getpagesize.c │ │ │ ├── my_getsystime.c │ │ │ ├── my_getwd.c │ │ │ ├── my_init.c │ │ │ ├── my_largepage.c │ │ │ ├── my_lib.c │ │ │ ├── my_lock.c │ │ │ ├── my_lockmem.c │ │ │ ├── my_malloc.c │ │ │ ├── my_memmem.c │ │ │ ├── my_mess.c │ │ │ ├── my_mkdir.c │ │ │ ├── my_mmap.c │ │ │ ├── my_new.cc │ │ │ ├── my_once.c │ │ │ ├── my_open.c │ │ │ ├── my_pread.c │ │ │ ├── my_pthread.c │ │ │ ├── my_quick.c │ │ │ ├── my_rdtsc.c │ │ │ ├── my_read.c │ │ │ ├── my_redel.c │ │ │ ├── my_rename.c │ │ │ ├── my_rnd.c │ │ │ ├── my_safehash.c │ │ │ ├── my_safehash.h │ │ │ ├── my_seek.c │ │ │ ├── my_sleep.c │ │ │ ├── my_static.c │ │ │ ├── my_static.h │ │ │ ├── my_symlink.c │ │ │ ├── my_symlink2.c │ │ │ ├── my_sync.c │ │ │ ├── my_thr_init.c │ │ │ ├── my_uuid.c │ │ │ ├── my_write.c │ │ │ ├── mysys_priv.h │ │ │ ├── ptr_cmp.c │ │ │ ├── queues.c │ │ │ ├── rijndael.c │ │ │ ├── safemalloc.c │ │ │ ├── sha1.c │ │ │ ├── stacktrace.c │ │ │ ├── string.c │ │ │ ├── thr_alarm.c │ │ │ ├── thr_lock.c │ │ │ ├── thr_mutex.c │ │ │ ├── thr_rwlock.c │ │ │ ├── tree.c │ │ │ ├── typelib.c │ │ │ ├── waiting_threads.c │ │ │ └── wqueue.c │ │ │ ├── sql-common │ │ │ ├── client.c │ │ │ ├── client_plugin.c │ │ │ ├── my_time.c │ │ │ ├── mysql_async.c │ │ │ └── pack.c │ │ │ ├── sql │ │ │ ├── net_serv.cc │ │ │ ├── password.c │ │ │ ├── share │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── errmsg-utf8.txt │ │ │ └── sql_builtin.cc.in │ │ │ ├── strings │ │ │ ├── CMakeLists.txt │ │ │ ├── bchange.c │ │ │ ├── bmove_upp.c │ │ │ ├── ctype-big5.c │ │ │ ├── ctype-bin.c │ │ │ ├── ctype-cp932.c │ │ │ ├── ctype-czech.c │ │ │ ├── ctype-euc_kr.c │ │ │ ├── ctype-eucjpms.c │ │ │ ├── ctype-extra.c │ │ │ ├── ctype-gb2312.c │ │ │ ├── ctype-gbk.c │ │ │ ├── ctype-latin1.c │ │ │ ├── ctype-mb.c │ │ │ ├── ctype-simple.c │ │ │ ├── ctype-sjis.c │ │ │ ├── ctype-tis620.c │ │ │ ├── ctype-uca.c │ │ │ ├── ctype-ucs2.c │ │ │ ├── ctype-ujis.c │ │ │ ├── ctype-utf8.c │ │ │ ├── ctype-win1250ch.c │ │ │ ├── ctype.c │ │ │ ├── decimal.c │ │ │ ├── dtoa.c │ │ │ ├── int2str.c │ │ │ ├── is_prefix.c │ │ │ ├── llstr.c │ │ │ ├── longlong2str.c │ │ │ ├── my_strchr.c │ │ │ ├── my_strtoll10.c │ │ │ ├── my_vsnprintf.c │ │ │ ├── str2int.c │ │ │ ├── str_alloc.c │ │ │ ├── strappend.c │ │ │ ├── strcend.c │ │ │ ├── strcont.c │ │ │ ├── strend.c │ │ │ ├── strfill.c │ │ │ ├── strings_def.h │ │ │ ├── strmake.c │ │ │ ├── strmov.c │ │ │ ├── strmov_overlapp.c │ │ │ ├── strnmov.c │ │ │ ├── strxmov.c │ │ │ ├── strxnmov.c │ │ │ ├── t_ctype.h │ │ │ └── xml.c │ │ │ ├── vio │ │ │ ├── CMakeLists.txt │ │ │ ├── vio.c │ │ │ ├── vio_priv.h │ │ │ ├── viosocket.c │ │ │ ├── viossl.c │ │ │ └── viosslfactories.c │ │ │ └── zlib │ │ │ ├── CMakeLists.txt │ │ │ ├── adler32.c │ │ │ ├── compress.c │ │ │ ├── crc32.c │ │ │ ├── crc32.h │ │ │ ├── deflate.c │ │ │ ├── deflate.h │ │ │ ├── gzio.c │ │ │ ├── infback.c │ │ │ ├── inffast.c │ │ │ ├── inffast.h │ │ │ ├── inffixed.h │ │ │ ├── inflate.c │ │ │ ├── inflate.h │ │ │ ├── inftrees.c │ │ │ ├── inftrees.h │ │ │ ├── trees.c │ │ │ ├── trees.h │ │ │ ├── uncompr.c │ │ │ ├── zconf.h │ │ │ ├── zlib.h │ │ │ ├── zutil.c │ │ │ └── zutil.h │ ├── dthread.c │ ├── dthread.h │ ├── duda_package.c │ ├── index.doc │ ├── mariadb.c │ ├── mariadb.h │ ├── pool.c │ ├── pool.h │ ├── query.c │ ├── query.h │ └── query_priv.h ├── redis │ ├── LICENSE │ ├── Makefile.in │ ├── async.c │ ├── async.h │ ├── dict.c │ ├── dict.h │ ├── duda_package.c │ ├── fmacros.h │ ├── hiredis.c │ ├── hiredis.h │ ├── net.c │ ├── net.h │ ├── redis.c │ ├── redis.h │ ├── sds.c │ └── sds.h ├── sha1 │ ├── Makefile.in │ ├── duda_package.c │ ├── index.doc │ ├── sha1.c │ └── sha1.h ├── sha256 │ ├── Makefile.in │ ├── duda_package.c │ ├── index.doc │ ├── sha256.c │ └── sha256.h ├── sqlite │ ├── Makefile.in │ ├── duda_package.c │ ├── index.doc │ ├── sqlite.c │ └── sqlite.h ├── ssls │ ├── Makefile.in │ ├── duda_package.c │ ├── ssl_server.c │ └── ssls.h └── websocket │ ├── ABOUT │ ├── Makefile.in │ ├── README │ ├── base64.c │ ├── base64.h │ ├── broadcast.c │ ├── broadcast.h │ ├── callbacks.c │ ├── callbacks.h │ ├── doc │ └── framing.txt │ ├── duda_package.c │ ├── index.doc │ ├── protocol.h │ ├── request.c │ ├── request.h │ ├── sha1.c │ ├── sha1.h │ ├── websocket.c │ └── websocket.h └── src ├── CMakeLists.txt ├── Makefile.in └── duda.c /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.d 3 | *.dpkg 4 | *.so 5 | *~ 6 | Makefile 7 | docs/html 8 | build/ 9 | include/duda/duda_version.h 10 | include/duda/duda_info.h 11 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "deps/monkey"] 2 | path = deps/monkey 3 | url = git@github.com:monkey/monkey 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Duda I/O 2 | 3 | [Duda](http://duda.io) is an event-driven framework to write scalable 4 | web services with a friendly C API. 5 | 6 | ## MUST READ! 7 | 8 | This _master_ branch belongs to the development version of the next 9 | generation of [Duda](http://duda.io), if you want to access the 10 | long term support version commonly used in production, please jump 11 | to the [dst-1](https://github.com/monkey/duda/tree/dst-1) branch: 12 | 13 | https://github.com/monkey/duda/tree/dst-1 14 | 15 | 16 | ## Build Instructions 17 | 18 | ``` 19 | $ git submodule update --init 20 | $ cd build/ 21 | $ cmake ../ 22 | $ make 23 | ``` 24 | 25 | ## Author 26 | 27 | Eduardo Silva 28 | http://edsiper.linuxchile.cl 29 | -------------------------------------------------------------------------------- /build/.empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/build/.empty -------------------------------------------------------------------------------- /conf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(conf_dir "${MK_PATH_CONF}/plugins/duda/") 2 | install(DIRECTORY DESTINATION ${conf_dir}) 3 | 4 | configure_file( 5 | "${PROJECT_SOURCE_DIR}/plugins/duda/conf/duda.conf.in" 6 | "${PROJECT_SOURCE_DIR}/plugins/duda/conf/duda.conf" 7 | ) 8 | 9 | if(BUILD_LOCAL) 10 | file(COPY duda.conf DESTINATION ${conf_dir}) 11 | else() 12 | install(FILES duda.conf DESTINATION ${conf_dir}) 13 | endif() 14 | -------------------------------------------------------------------------------- /conf/duda.conf.in: -------------------------------------------------------------------------------- 1 | [DUDA] 2 | ServicesRoot /home/edsiper/coding/duda-examples/001_hello_world 3 | PackagesRoot @PROJECT_SOURCE_DIR@/plugins/duda/packages 4 | DocumentRoot @PROJECT_SOURCE_DIR@/plugins/duda/htdocs 5 | -------------------------------------------------------------------------------- /docs/Makefile.in: -------------------------------------------------------------------------------- 1 | all: 2 | ./generator 3 | 4 | clean: 5 | rm -rf html/*.html *~ 6 | -------------------------------------------------------------------------------- /docs/html/assets/css/prettify.css: -------------------------------------------------------------------------------- 1 | .com { color: #93a1a1; } 2 | .lit { color: #195f91; } 3 | .pun, .opn, .clo { color: #93a1a1; } 4 | .fun { color: #dc322f; } 5 | .str, .atv { color: #D14; } 6 | .kwd, .linenums .tag { color: #1e347b; } 7 | .typ, .atn, .dec, .var { color: teal; } 8 | .pln { color: #48484c; } 9 | 10 | .prettyprint { 11 | padding: 8px; 12 | background-color: #f7f7f9; 13 | border: 1px solid #e1e1e8; 14 | } 15 | .prettyprint.linenums { 16 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 17 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 18 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 19 | } 20 | 21 | /* Specify class=linenums on a pre to get line numbering */ 22 | ol.linenums { 23 | margin: 0 0 0 33px; /* IE indents via margin-left */ 24 | } 25 | ol.linenums li { 26 | padding-left: 12px; 27 | color: #bebec5; 28 | line-height: 18px; 29 | text-shadow: 0 1px 0 #fff; 30 | } -------------------------------------------------------------------------------- /docs/html/assets/js/lang-apollo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/assets/js/lang-apollo.js -------------------------------------------------------------------------------- /docs/html/assets/js/lang-clj.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 Google Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | var a=null; 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a], 18 | ["typ",/^:[\dA-Za-z-]+/]]),["clj"]); 19 | -------------------------------------------------------------------------------- /docs/html/assets/js/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /docs/html/assets/js/lang-go.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/assets/js/lang-go.js -------------------------------------------------------------------------------- /docs/html/assets/js/lang-hs.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n \r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/, 2 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]); 3 | -------------------------------------------------------------------------------- /docs/html/assets/js/lang-lisp.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a], 3 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]); 4 | -------------------------------------------------------------------------------- /docs/html/assets/js/lang-lua.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/assets/js/lang-lua.js -------------------------------------------------------------------------------- /docs/html/assets/js/lang-ml.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/assets/js/lang-ml.js -------------------------------------------------------------------------------- /docs/html/assets/js/lang-n.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/, 3 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 4 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]); 5 | -------------------------------------------------------------------------------- /docs/html/assets/js/lang-proto.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); 2 | -------------------------------------------------------------------------------- /docs/html/assets/js/lang-scala.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/assets/js/lang-scala.js -------------------------------------------------------------------------------- /docs/html/assets/js/lang-sql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/assets/js/lang-sql.js -------------------------------------------------------------------------------- /docs/html/assets/js/lang-tex.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/assets/js/lang-tex.js -------------------------------------------------------------------------------- /docs/html/assets/js/lang-vb.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/assets/js/lang-vb.js -------------------------------------------------------------------------------- /docs/html/assets/js/lang-vhdl.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/assets/js/lang-vhdl.js -------------------------------------------------------------------------------- /docs/html/assets/js/lang-wiki.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/assets/js/lang-wiki.js -------------------------------------------------------------------------------- /docs/html/assets/js/lang-yaml.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]); 3 | -------------------------------------------------------------------------------- /docs/html/bootstrap.txt: -------------------------------------------------------------------------------- 1 | Using Twitter Bootstrap 2.0.4: http://twitter.github.com/bootstrap 2 | -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-apollo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/css/prettify/lang-apollo.js -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-clj.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2011 Google Inc. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | var a=null; 17 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a], 18 | ["typ",/^:[\dA-Za-z-]+/]]),["clj"]); 19 | -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-go.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/css/prettify/lang-go.js -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-hs.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n \r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/, 2 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]); 3 | -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-lisp.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a], 3 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]); 4 | -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-lua.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/css/prettify/lang-lua.js -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-ml.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/css/prettify/lang-ml.js -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-n.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/, 3 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 4 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]); 5 | -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-proto.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); 2 | -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-scala.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/css/prettify/lang-scala.js -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-sql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/css/prettify/lang-sql.js -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-tex.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/css/prettify/lang-tex.js -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-vb.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/css/prettify/lang-vb.js -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-vhdl.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/css/prettify/lang-vhdl.js -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-wiki.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/css/prettify/lang-wiki.js -------------------------------------------------------------------------------- /docs/html/css/prettify/lang-yaml.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]); 3 | -------------------------------------------------------------------------------- /docs/html/css/prettify/prettify.css: -------------------------------------------------------------------------------- 1 | .com { color: #93a1a1; } 2 | .lit { color: #195f91; } 3 | .pun, .opn, .clo { color: #93a1a1; } 4 | .fun { color: #dc322f; } 5 | .str, .atv { color: #D14; } 6 | .kwd, .linenums .tag { color: #1e347b; } 7 | .typ, .atn, .dec, .var { color: teal; } 8 | .pln { color: #48484c; } 9 | 10 | .prettyprint { 11 | padding: 8px; 12 | background-color: #f7f7f9; 13 | border: 1px solid #e1e1e8; 14 | } 15 | .prettyprint.linenums { 16 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 17 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 18 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 19 | } 20 | 21 | /* Specify class=linenums on a pre to get line numbering */ 22 | ol.linenums { 23 | margin: 0 0 0 33px; /* IE indents via margin-left */ 24 | } 25 | ol.linenums li { 26 | padding-left: 12px; 27 | color: #bebec5; 28 | line-height: 18px; 29 | text-shadow: 0 1px 0 #fff; 30 | } -------------------------------------------------------------------------------- /docs/html/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/html/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/docs/html/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/index.doc: -------------------------------------------------------------------------------- 1 | docs/intro/index.html 2 | src/duda_console.c 3 | src/duda_cookie.c 4 | src/duda_conf.c 5 | src/duda_data.c 6 | src/duda_fconf.c 7 | src/duda_event.c 8 | src/duda_gc.c 9 | src/duda_mem.c 10 | src/duda_global.c 11 | src/duda_log.c 12 | src/duda_map.c 13 | src/duda_param.c 14 | src/duda_qs.c 15 | src/duda_response.c 16 | src/duda_request.c 17 | src/duda_router.c 18 | src/duda_session.c 19 | src/duda_worker.c 20 | src/duda_xtime.c 21 | src/duda_dthread.c 22 | src/duda_dthread_channel.c 23 | packages/base64 24 | packages/json 25 | packages/kv 26 | packages/sha1 27 | packages/sha256 28 | packages/sqlite 29 | packages/websocket 30 | packages/mariadb -------------------------------------------------------------------------------- /docs/intro/index.html: -------------------------------------------------------------------------------- 1 | @INTRO_MENU: Introduction 2 | 3 |

Duda I/O API

4 |

5 | Duda is a framework to create fast and solid web services on top 6 | of Monkey HTTP stack. All the interfaces 7 | are available in C language in a pseudo-object format. 8 |

9 |

10 | All API calls or methods are grouped inside different objects, by default 11 | the objects are already initialized by the Duda core, no instance creation is required. 12 |

13 | 14 |

Core objects and packages

15 |

16 | When developing a Web Application or Web Service with Duda, you will find two types 17 | of objects, those who are built-in into the core and the external objects called 18 | Packages. 19 |

20 |

21 | The Core Objects expose interfaces for common routines such as parse 22 | requests, compose responses, manage cookies or sessions, read configuration files, etc. 23 | But in most of cases this is not enough and due to the implementation requirement will 24 | be required to connect to some database, work under a sub-protocol such as WebSockets 25 | or just some helpers to use JSON. This is when Packages join into the game. 26 |

27 |

28 | A Package is an Object that is not known or 29 | initializated by Duda. It's an external component that can be used by the 30 | Web Application on-demand and it requires some special handling which includes 31 | to load the Package header file and the explicit call to 32 | duda_load_package(...) inside duda_main() to instance the 33 | object into the application. 34 |

35 |

36 | Each Package documented here explains it owns requirements to be loaded 37 | successfully. 38 |

39 | -------------------------------------------------------------------------------- /include/duda/duda.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. . 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_H 21 | #define DUDA_H 22 | 23 | #define _GNU_SOURCE 24 | 25 | #include 26 | #include 27 | 28 | #include "duda_info.h" 29 | #include "duda_version.h" 30 | #include "duda_lib.h" 31 | #include "duda.h" 32 | #include "duda_api.h" 33 | #include "duda_objects.h" 34 | #include "duda_service.h" 35 | #include "duda_request.h" 36 | 37 | /* Special headers for web services only */ 38 | #ifndef DUDA_LIB_CORE 39 | #include "duda_bootstrap.h" 40 | #include "duda/duda_service_internal.h" 41 | #endif /* !DUDA_LIB_CORE */ 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /include/duda/duda_body_buffer.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_BODY_BUFFER_H 21 | #define DUDA_BODY_BUFFER_H 22 | 23 | /* 24 | * The response body holds an IOV array struct of BODY_BUFFER_SIZE, 25 | * when the limit is reached, the pointer is reallocated adding a new chunk 26 | */ 27 | #define BODY_BUFFER_SIZE 8 28 | 29 | 30 | struct duda_body_buffer { 31 | struct mk_iov *buf; 32 | unsigned short int size; 33 | unsigned long int sent; 34 | }; 35 | 36 | struct duda_body_buffer *duda_body_buffer_new(); 37 | int duda_body_buffer_expand(struct duda_body_buffer *bb); 38 | int duda_body_buffer_flush(int sock, struct duda_body_buffer *bb); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /include/duda/duda_debug.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_DEBUG_H 21 | #define DUDA_DEBUG_H 22 | 23 | void duda_debug_info(const char *format, ...); 24 | void duda_debug_warn(const char *format, ...); 25 | void duda_debug_err(const char *format, ...); 26 | void duda_debug_bug(const char *format, ...); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /include/duda/duda_gc_map.h: -------------------------------------------------------------------------------- 1 | #ifndef DUDA_GC_MAP_H 2 | #define DUDA_GC_MAP_H 3 | 4 | #define DUDA_GC_ENTRIES 64 5 | #define DUDA_GC_CHUNK 16 6 | 7 | struct duda_gc_map { 8 | int used; /* number of used cells */ 9 | int size; /* number of cells */ 10 | 11 | struct duda_gc_entry *cells; 12 | }; 13 | 14 | struct duda_gc_entry { 15 | int status; /* 0 = free ; 1 = used */ 16 | void *p; /* pointer to target memory address */ 17 | }; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /include/duda/duda_info.h.in: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. . 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_INFO_H 21 | #define DUDA_INFO_H 22 | 23 | /* General flags set by CMakeLists.txt */ 24 | @DUDA_BUILD_FLAGS@ 25 | 26 | #define DUDA_INFO_FLAGS "@DUDA_INFO_FLAGS@" 27 | #endif 28 | -------------------------------------------------------------------------------- /include/duda/duda_lib.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. . 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_LIB_H 21 | #define DUDA_LIB_H 22 | 23 | /* Duda runtime context */ 24 | struct duda { 25 | /* Monkey runtime context */ 26 | mk_ctx_t *monkey; 27 | 28 | /* Setup */ 29 | char *tcp_port; 30 | 31 | /* List head for active web services */ 32 | struct mk_list services; 33 | }; 34 | 35 | #define DUDA_DEFAULT_PORT "8080" 36 | 37 | struct duda *duda_create(); 38 | int duda_destroy(struct duda *duda_ctx); 39 | 40 | struct duda_service *duda_service_create(struct duda *d, char *root, char *log, 41 | char *data, char *html, char *service); 42 | int duda_service_destroy(struct duda_service *ds); 43 | 44 | int duda_start(struct duda *duda_ctx); 45 | int duda_stop(struct duda *duda_ctx); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /include/duda/duda_old.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | extern struct mk_plugin mk_plugin_duda; 21 | 22 | #include "duda_webservice.h" 23 | #include "duda_conf.h" 24 | #include "duda_gc_map.h" 25 | #include "duda_qs_map.h" 26 | #include "duda_router_uri.h" 27 | 28 | #ifndef DUDA_MAIN_H 29 | #define DUDA_MAIN_H 30 | 31 | #define MAP_WS_APP_NAME 0X00 32 | #define MAP_WS_INTERFACE 0X10 33 | #define MAP_WS_METHOD 0X20 34 | #define MAP_WS_PARAM 0X30 35 | #define MAP_WS_END 0X40 36 | 37 | /* Max number of parameters allowed in Duda URI */ 38 | #define MAP_WS_MAX_PARAMS 8 39 | 40 | /* self identifier for the plugin context inside Monkey internals */ 41 | struct mk_plugin *duda_plugin; 42 | 43 | pthread_key_t duda_global_events_write; 44 | pthread_key_t duda_global_dr_list; 45 | pthread_mutex_t duda_mutex_thctx; 46 | 47 | mk_ptr_t dd_iov_none; 48 | 49 | void *duda_load_library(const char *path); 50 | void *duda_load_symbol(void *handle, const char *symbol); 51 | int duda_service_end(duda_request_t *dr); 52 | 53 | duda_request_t *duda_dr_list_get(struct mk_http_request *sr); 54 | void duda_worker_init(); 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /include/duda/duda_qs_map.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #include 21 | 22 | #ifndef DUDA_QS_MAP_H 23 | #define DUDA_QS_MAP_H 24 | 25 | /* 26 | * We initially define that we will get no more than QS_ENTRIES_SIZE variables 27 | * in the query string. This is a fixed value to reduce the risk of a memory 28 | * consumption attack. 29 | */ 30 | #define QS_ENTRIES_SIZE 32 31 | 32 | struct duda_qs_entry { 33 | mk_ptr_t key; 34 | mk_ptr_t value; 35 | }; 36 | 37 | struct duda_qs_map { 38 | int count; /* number of key/values in the query string */ 39 | struct duda_qs_entry entries[QS_ENTRIES_SIZE]; 40 | }; 41 | 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /include/duda/duda_router_uri.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef MK_DUDA_ROUTER_URI_H 21 | #define MK_DUDA_ROUTER_URI_H 22 | 23 | #define DUDA_ROUTER_URI_MAX 32 24 | 25 | struct duda_router_uri_field { 26 | int type; 27 | int name_len; 28 | char *name; 29 | }; 30 | 31 | /* 32 | * A context of a parsed URI to perform further lookups 33 | * with Router rules 34 | */ 35 | struct duda_router_uri { 36 | int len; 37 | struct duda_router_uri_field fields[DUDA_ROUTER_URI_MAX]; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /include/duda/duda_sendfile.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_SENDFILE_H 21 | #define DUDA_SENDFILE_H 22 | 23 | struct duda_sendfile { 24 | int fd; 25 | off_t offset; 26 | unsigned long pending_bytes; 27 | 28 | struct file_info info; 29 | }; 30 | 31 | struct duda_sendfile *duda_sendfile_new(char *path, off_t offset, 32 | size_t count); 33 | int duda_sendfile_flush(int socket, struct duda_sendfile *sf); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /include/duda/duda_service_internal.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. . 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_SERVICE_INTERNAL_H 21 | #define DUDA_SERVICE_INTERNAL_H 22 | 23 | #include "duda.h" 24 | 25 | /* Web Service context */ 26 | struct duda_service { 27 | /* Configuration paths */ 28 | char *path_root; /* Prefix path for web service requirements */ 29 | char *path_log; /* Directory for logs */ 30 | char *path_data; /* Private data directory */ 31 | char *path_html; /* Public HTML files */ 32 | char *path_service; /* Path for web service file (.duda) */ 33 | void *dl_handle; /* Service/Shared library handle */ 34 | struct mk_list _head; /* link to parent list duda->services */ 35 | 36 | /* Specific requirements by API Objects used in duda_main() context */ 37 | struct mk_list router_list; /* list head for routing paths */ 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /include/duda/duda_stats.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. . 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_STATS_H 21 | #define DUDA_STATS_H 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #include 28 | #include "duda_stats_proc.h" 29 | 30 | struct duda_stats_worker { 31 | pid_t task_id; 32 | uint64_t *mem_allocated; 33 | uint64_t *mem_deallocated; 34 | char *worker_name; 35 | 36 | struct mk_list _head; 37 | }; 38 | 39 | struct duda_statistics { 40 | struct mk_list mem; 41 | }; 42 | 43 | int duda_stats_cpu_hz; 44 | int duda_stats_pagesize; 45 | 46 | pthread_mutex_t duda_mutex_stats; 47 | struct duda_statistics duda_stats; 48 | 49 | void duda_stats_cb(duda_request_t *dr); 50 | void duda_stats_txt_cb(duda_request_t *dr); 51 | int duda_stats_worker_init(); 52 | int duda_stats_init(); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /include/duda/duda_utils.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_UTILS_H 21 | #define DUDA_UTILS_H 22 | 23 | int duda_utils_strtol(const char *nptr, int len, long *result); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /include/duda/duda_version.h.in: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. . 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_VERSION_H 21 | #define DUDA_VERSION_H 22 | 23 | /* Helpers to convert/format version string */ 24 | #define STR_HELPER(s) #s 25 | #define STR(s) STR_HELPER(s) 26 | 27 | /* Fluent Bit Version */ 28 | #define DUDA_VERSION_MAJOR @DUDA_VERSION_MAJOR@ 29 | #define DUDA_VERSION_MINOR @DUDA_VERSION_MINOR@ 30 | #define DUDA_VERSION_PATCH @DUDA_VERSION_PATCH@ 31 | #define DUDA_VERSION (DUDA_VERSION_MAJOR * 10000 \ 32 | DUDA_VERSION_MINOR * 100 \ 33 | DUDA_VERSION_PATCH) 34 | #define DUDA_VERSION_STR "@DUDA_VERSION_STR@" 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /include/duda/objects/duda_data.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #include "duda_api.h" 21 | 22 | #ifndef MK_DUDA_DATA_H 23 | #define MK_DUDA_DATA_H 24 | 25 | /* Object API */ 26 | 27 | struct duda_api_data { 28 | #define set_path(dir) _set_path(self, dir) 29 | int (*_set_path) (struct web_service *, const char *); 30 | 31 | #define get_path() _get_path(self) 32 | const char *(*_get_path) (struct web_service *); 33 | 34 | #define locate(f) _locate(dr, f) 35 | char *(*_locate) (duda_request_t *, const char *); 36 | }; 37 | 38 | struct duda_api_data *duda_data_object(); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /include/duda/objects/duda_gc.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_GC_H 21 | #define DUDA_GC_H 22 | 23 | #include "duda/duda_request.h" 24 | 25 | /* Garbage Collector object: gc->x() */ 26 | struct duda_api_gc { 27 | int (*add) (duda_request_t *dr, void *p); 28 | }; 29 | 30 | /* Exported functions */ 31 | int duda_gc_init(duda_request_t *dr); 32 | int duda_gc_add(duda_request_t *dr, void *p); 33 | void *duda_gc_alloc(duda_request_t *dr, const size_t size); 34 | int duda_gc_free_content(duda_request_t *dr); 35 | int duda_gc_free(duda_request_t *dr); 36 | struct duda_api_gc *duda_gc_object(); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /include/duda/objects/duda_mem.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_MEM_H 21 | #define DUDA_MEM_H 22 | 23 | #include 24 | 25 | struct duda_api_mem { 26 | void *(*alloc) (const size_t); 27 | void *(*alloc_z) (const size_t); 28 | void *(*realloc) (void *, const size_t); 29 | void (*free) (void *); 30 | }; 31 | 32 | struct duda_api_mem *duda_mem_object(); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/duda/objects/duda_param.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_PARAM_H 21 | #define DUDA_PARAM_H 22 | 23 | #include "duda.h" 24 | 25 | struct duda_api_param { 26 | char *(*get) (duda_request_t *, const char *); 27 | int (*get_number)(duda_request_t *, const char *, long *); 28 | }; 29 | 30 | struct duda_api_param *duda_param_object(); 31 | char *duda_param_get(duda_request_t *dr, const char *key); 32 | int duda_param_get_number(duda_request_t *dr, const char *key, long *res); 33 | 34 | short int duda_param_count(duda_request_t *dr); 35 | short int duda_param_len(duda_request_t *dr, short int idx); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /include/duda/objects/duda_qs.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_QS_H 21 | #define DUDA_QS_H 22 | 23 | struct duda_api_qs { 24 | int (*count) (duda_request_t *); 25 | char *(*get) (duda_request_t *, const char *); 26 | char *(*get_id) (duda_request_t *, int); 27 | int (*cmp) (duda_request_t *, const char *, const char *); 28 | }; 29 | 30 | 31 | int duda_qs_parse(duda_request_t *dr); 32 | int duda_qs_count(duda_request_t *dr); 33 | char *duda_qs_get(duda_request_t *dr, const char *key); 34 | char *duda_qs_get_id(duda_request_t *dr, int idx); 35 | int duda_qs_cmp(duda_request_t *dr, const char *key, const char *value); 36 | 37 | struct duda_api_qs *duda_qs_object(); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /include/duda/objects/duda_session.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_SESSION_H 21 | #define DUDA_SESSION_H 22 | 23 | #include "duda.h" 24 | 25 | #define SESSION_STORE_PATH_DEV "/dev/shm/duda_sessions" 26 | #define SESSION_STORE_PATH_RUN "/run/shm/duda_sessions" 27 | 28 | #define SESSION_DEFAULT_PERM 0700 29 | #define SESSION_UUID_SIZE 128 /* 128 bytes */ 30 | #define SESSION_KEY "DUDA_SESSION" 31 | 32 | char *session_store_path; 33 | 34 | struct mk_list session_list; 35 | 36 | struct duda_api_session { 37 | int (*init) (char *); 38 | int (*create) (duda_request_t *, char *, char *, int); 39 | int (*destroy) (duda_request_t *, char *); 40 | void *(*get) (duda_request_t *, char *); 41 | int (*isset) (duda_request_t *, char *); 42 | }; 43 | 44 | struct duda_api_session *duda_session_object(); 45 | int duda_session_init(char *store_name); 46 | int duda_session_create(duda_request_t *dr, char *name, char *value, int expires); 47 | int duda_session_destroy(duda_request_t *dr, char *name); 48 | void *duda_session_get(duda_request_t *dr, char *name); 49 | int duda_session_isset(duda_request_t *dr, char *name); 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /include/duda/objects/duda_worker.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_API_WORKER_H 21 | #define DUDA_API_WORKER_H 22 | 23 | #include 24 | 25 | 26 | /* Defines a node for the pre-worker loop */ 27 | struct duda_worker_pre { 28 | void (*func) (void *); 29 | void *data; 30 | struct mk_list _head; 31 | }; 32 | 33 | /* 34 | * A simple struct/node to store the information of a working 35 | * thread that must me run at once duda_main() have been finished 36 | */ 37 | struct duda_worker { 38 | int id; 39 | void *(*func) (void *); 40 | void *arg; 41 | 42 | struct mk_list _head; 43 | }; 44 | 45 | /* Worker object: worker->x() */ 46 | struct duda_api_worker { 47 | int (*_spawn) (void *(start_routine) (void *), void *, struct mk_list *); 48 | void (*pre_loop) (void (*func) (void *), void *); 49 | }; 50 | 51 | int duda_worker_spawn_all(struct mk_list *list); 52 | int duda_worker_spawn(void *(start_routine) (void *), void *arg, struct mk_list *list); 53 | struct duda_api_worker *duda_worker_object(); 54 | 55 | #define spawn(routine, arg) _spawn(routine, arg, &duda_worker_list) 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /include/duda/objects/duda_xtime.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2016, Eduardo Silva P. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_TIME_H 21 | #define DUDA_TIME_H 22 | 23 | #define TIME_HOUR 3600 24 | #define TIME_DAY (TIME_HOUR * 24) 25 | 26 | struct duda_api_xtime { 27 | time_t (*now) (); 28 | time_t (*tomorrow) (); 29 | time_t (*next_hours) (int); 30 | }; 31 | 32 | time_t duda_xtime_now(); 33 | time_t duda_xtime_tomorrow(); 34 | time_t duda_xtime_next_hours(int h); 35 | struct duda_api_xtime *duda_xtime_object(); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(src 2 | # Library core 3 | duda.c 4 | duda_service.c 5 | duda_request.c 6 | duda_old_launcher.c 7 | duda_conf.c 8 | duda_api.c 9 | duda_event.c 10 | duda_body_buffer.c 11 | duda_sendfile.c 12 | duda_debug.c 13 | duda_package.c 14 | duda_queue.c 15 | duda_stats.c 16 | duda_fconf.c 17 | duda_utils.c 18 | 19 | # API Objects 20 | objects/duda_gc.c 21 | objects/duda_log.c 22 | objects/duda_param.c 23 | objects/duda_session.c 24 | objects/duda_cookie.c 25 | objects/duda_global.c 26 | objects/duda_request.c 27 | objects/duda_response.c 28 | objects/duda_mem.c 29 | objects/duda_console.c 30 | objects/duda_qs.c 31 | objects/duda_worker.c 32 | objects/duda_data.c 33 | objects/duda_xtime.c 34 | objects/duda_dthread.c 35 | objects/duda_dthread_channel.c 36 | objects/duda_router.c 37 | ) 38 | 39 | add_definitions(-DDUDA_LIB_CORE) 40 | add_library(duda-static STATIC ${src}) 41 | target_link_libraries(duda-static pthread dl monkey-core-static) 42 | set_target_properties(duda-static PROPERTIES OUTPUT_NAME duda) 43 | -------------------------------------------------------------------------------- /packages/Makefile.in: -------------------------------------------------------------------------------- 1 | DIRS = base64 json sha1 sha256 kv sqlite websocket $(DUDA_EXTRA_PACKAGES) 2 | 3 | all: 4 | @(for d in $(DIRS); do $(MAKE) -C $$d; done) 5 | 6 | clean: 7 | @(for d in $(DIRS); do $(MAKE) -C $$d clean; done) 8 | rm -rf *.dpkg 9 | 10 | -------------------------------------------------------------------------------- /packages/base64/Makefile.in: -------------------------------------------------------------------------------- 1 | _PATH = $(patsubst $(monkey_root)/%, %, $(CURDIR)) 2 | CC = @echo " CC $(_PATH)/$@"; $CC 3 | CC_QUIET= @echo -n; $CC 4 | CFLAGS = $CFLAGS 5 | LDFLAGS = $LDFLAGS 6 | DEFS = $DEFS 7 | INCDIR = ../../../../include/ -I../../src 8 | OBJECTS = duda_package.o base64.o 9 | SOURCES = duda_package.c base64.c 10 | 11 | all: ../base64.dpkg 12 | 13 | -include $(OBJECTS:.o=.d) 14 | 15 | ../base64.dpkg: $(OBJECTS) 16 | $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -shared -o $@ $^ -lc 17 | 18 | .c.o: $(SOURCES) 19 | $(CC) $(CFLAGS) $(DEFS) -I$(INCDIR) -fPIC -c $< 20 | $(CC_QUIET) -MM -MP $(CFLAGS) $(DEFS) -I$(INCDIR) $*.c -o $*.d > /dev/null &2>&1 21 | 22 | clean: 23 | rm -rf *~ *.o 24 | -------------------------------------------------------------------------------- /packages/base64/base64.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2014, Eduardo Silva P. . 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_PACKAGE_BASE64_H 21 | #define DUDA_PACKAGE_BASE64_H 22 | #include 23 | 24 | struct duda_api_base64 { 25 | unsigned char *(*encode) (const unsigned char *, size_t, size_t *); 26 | unsigned char *(*decode) (const unsigned char *, size_t, size_t *); 27 | }; 28 | 29 | typedef struct duda_api_base64 base64_object_t; 30 | base64_object_t *base64; 31 | 32 | unsigned char *base64_encode(const unsigned char *src, size_t len, 33 | size_t *out_len); 34 | unsigned char *base64_decode(const unsigned char *src, size_t len, 35 | size_t *out_len); 36 | #endif 37 | -------------------------------------------------------------------------------- /packages/base64/duda_package.c: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2014, Eduardo Silva P. . 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #include 21 | 22 | #include "duda_package.h" 23 | #include "base64.h" 24 | 25 | struct duda_api_base64 *get_base64_api() 26 | { 27 | struct duda_api_base64 *base64; 28 | 29 | /* Alloc object */ 30 | base64 = monkey->mem_alloc(sizeof(struct duda_api_base64)); 31 | 32 | /* Map API calls */ 33 | base64->encode = base64_encode; 34 | base64->decode = base64_decode; 35 | 36 | return base64; 37 | } 38 | 39 | duda_package_t *duda_package_main() 40 | { 41 | duda_package_t *dpkg; 42 | 43 | /* Package object */ 44 | dpkg = monkey->mem_alloc(sizeof(duda_package_t)); 45 | dpkg->name = "base64"; 46 | dpkg->version = "0.1"; 47 | dpkg->api = get_base64_api(); 48 | 49 | return dpkg; 50 | } 51 | -------------------------------------------------------------------------------- /packages/base64/index.doc: -------------------------------------------------------------------------------- 1 | base64.c -------------------------------------------------------------------------------- /packages/json/Makefile.in: -------------------------------------------------------------------------------- 1 | _PATH = $(patsubst $(monkey_root)/%, %, $(CURDIR)) 2 | CC = @echo " CC $(_PATH)/$@"; $CC 3 | CC_QUIET= @echo -n; $CC 4 | CFLAGS = $CFLAGS 5 | LDFLAGS = $LDFLAGS 6 | DEFS = $DEFS 7 | INCDIR = ../../../../include/ -I../../src 8 | OBJECTS = duda_package.o cJSON.o 9 | SOURCES = duda_package.c cJSON.c 10 | 11 | all: ../json.dpkg 12 | 13 | -include $(OBJECTS:.o=.d) 14 | 15 | ../json.dpkg: $(OBJECTS) 16 | $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -shared -o $@ $^ -lc -lm 17 | 18 | .c.o: 19 | $(CC) $(CFLAGS) $(DEFS) -I$(INCDIR) -fPIC -c $< 20 | $(CC_QUIET) -MM -MP $(CFLAGS) $(DEFS) -I$(INCDIR) $*.c -o $*.d > /dev/null &2>&1 21 | 22 | clean: 23 | rm -rf *~ *.o 24 | -------------------------------------------------------------------------------- /packages/json/index.doc: -------------------------------------------------------------------------------- 1 | duda_package.c 2 | -------------------------------------------------------------------------------- /packages/mariadb/Makefile.in: -------------------------------------------------------------------------------- 1 | _PATH = $(patsubst $(monkey_root)/%, %, $(CURDIR)) 2 | CC = @echo " CC $(_PATH)/$@"; $CC 3 | CC_QUIET= @echo -n; $CC 4 | CFLAGS = $CFLAGS 5 | LDFLAGS = $LDFLAGS 6 | DEFS = $DEFS 7 | INCDIR = ../../../../include -I../../src -Ideps/libmariadbclient/include -Ideps/libmariadbclient/obj/include 8 | OBJECTS = duda_package.o mariadb.o connection.o query.o pool.o async.o dthread.o 9 | SOURCES = duda_package.c mariadb.c connection.c query.c pool.c async.c dthread.c 10 | 11 | all: libmariadbclient.a ../mariadb.dpkg 12 | 13 | -include $(OBJECTS:.o=.d) 14 | 15 | ../mariadb.dpkg: $(OBJECTS) 16 | $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -shared -o $@ $^ deps/libmariadbclient/obj/libmysql/libmysqlclient.a -lc 17 | 18 | .c.o: $(SOURCES) 19 | $(CC) $(CFLAGS) $(DEFS) -I$(INCDIR) -fPIC -c $< 20 | $(CC_QUIET) -MM -MP $(CFLAGS) $(DEFS) -I$(INCDIR) $*.c -o $*.d > /dev/null &2>&1 21 | 22 | libmariadbclient.a: 23 | @(cd deps/libmariadbclient/ && mkdir -p obj && cd obj \ 24 | && cmake -DBUILD_CONFIG=mysql_release -DCMAKE_BUILD_TYPE=Release -DWITHOUT_SERVER=on .. \ 25 | && make mysqlclient && cd ../../../) 26 | 27 | clean: 28 | rm -rf *~ *.o 29 | rm -rf deps/libmariadbclient/obj/ 30 | -------------------------------------------------------------------------------- /packages/mariadb/async.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2013, Zeying Xie 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef MARIADB_ASYNC_H 23 | #define MARIADB_ASYNC_H 24 | 25 | int mariadb_async_handle_connect(mariadb_conn_t *conn, mariadb_connect_cb *cb); 26 | void mariadb_async_handle_query(mariadb_conn_t *conn); 27 | void mariadb_async_handle_result(mariadb_conn_t *conn); 28 | void mariadb_async_handle_row(mariadb_conn_t *conn); 29 | void mariadb_async_handle_result_free(mariadb_conn_t *conn); 30 | void mariadb_async_handle_next_result(mariadb_conn_t *conn); 31 | void mariadb_async_handle_disconnect(mariadb_conn_t *conn, mariadb_disconnect_cb *cb); 32 | void mariadb_async_handle_release(mariadb_conn_t* conn, int status); 33 | 34 | int mariadb_async_handle_add_query(mariadb_conn_t *conn, const char *query_str, 35 | mariadb_query_result_cb *result_cb, 36 | mariadb_query_row_cb *row_cb, 37 | mariadb_query_end_cb *end_cb, void *privdata); 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /packages/mariadb/common.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2013, Zeying Xie 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #include "duda_api.h" 23 | 24 | #define MARIADB_OK 0 25 | #define MARIADB_ERR -1 26 | 27 | #define FREE(p) if (p) { monkey->mem_free(p); p = NULL; } 28 | -------------------------------------------------------------------------------- /packages/mariadb/connection.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2013, Zeying Xie 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef MARIADB_CONNECTION_H 23 | #define MARIADB_CONNECTION_H 24 | 25 | typedef struct mariadb_conn mariadb_conn_t; /* forward declaration */ 26 | typedef void (mariadb_connect_cb)(mariadb_conn_t *conn, int status, duda_request_t *dr); 27 | typedef void (mariadb_disconnect_cb)(mariadb_conn_t *conn, int status, duda_request_t *dr); 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/VERSION: -------------------------------------------------------------------------------- 1 | MYSQL_VERSION_MAJOR=5 2 | MYSQL_VERSION_MINOR=5 3 | MYSQL_VERSION_PATCH=31 4 | MYSQL_VERSION_EXTRA= 5 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/cmake/check_minimal_version.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009 Sun Microsystems, Inc. 2 | # Use is subject to license terms. 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; version 2 of the License. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | # This is a helper script is used to check for the minimal required version 18 | # It helps to decide whether to use autoconf based configure or cmake's 19 | # configure 20 | CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) 21 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/cmake/configurable_file_content.in: -------------------------------------------------------------------------------- 1 | @CMAKE_CONFIGURABLE_FILE_CONTENT@ 2 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/cmake/ctest.cmake: -------------------------------------------------------------------------------- 1 | 2 | INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/cmake_parse_arguments.cmake) 3 | 4 | MACRO(MY_ADD_TEST name) 5 | ADD_TEST(${name} ${name}-t) 6 | ENDMACRO() 7 | 8 | MACRO (MY_ADD_TESTS) 9 | MYSQL_PARSE_ARGUMENTS(ARG "LINK_LIBRARIES;EXT" "" ${ARGN}) 10 | 11 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include 12 | ${CMAKE_SOURCE_DIR}/unittest/mytap) 13 | 14 | IF (NOT ARG_EXT) 15 | SET(ARG_EXT "c") 16 | ENDIF() 17 | 18 | FOREACH(name ${ARG_DEFAULT_ARGS}) 19 | ADD_EXECUTABLE(${name}-t "${name}-t.${ARG_EXT}") 20 | TARGET_LINK_LIBRARIES(${name}-t mytap ${ARG_LINK_LIBRARIES}) 21 | MY_ADD_TEST(${name}) 22 | ENDFOREACH() 23 | ENDMACRO() 24 | 25 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/cmake/info_bin.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | 17 | # The sole purpose of this cmake control file is to create the "INFO_BIN" file. 18 | 19 | # By having a separate cmake file for this, it is ensured this happens 20 | # only in the build (Unix: "make") phase, not when cmake runs. 21 | # This, in turn, avoids creating stuff in the source directory - 22 | # it should get into the binary directory only. 23 | 24 | 25 | # Get the macros which the "INFO_*" files. 26 | INCLUDE(${CMAKE_BINARY_DIR}/info_macros.cmake) 27 | 28 | # Here is where the action is. 29 | CREATE_INFO_BIN() 30 | 31 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/cmake/info_src.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | 17 | # The sole purpose of this cmake control file is to create the "INFO_SRC" file. 18 | 19 | # As long as and "bzr pull" (or "bzr commit") is followed by a "cmake", 20 | # the call in top level "CMakeLists.txt" is sufficient. 21 | # This file is to provide a separate target for the "make" phase, 22 | # to ensure the BZR revision-id is correct even after a sequence 23 | # cmake ; make ; bzr pull ; make 24 | 25 | 26 | # Get the macros which handle the "INFO_*" files. 27 | INCLUDE(${CMAKE_BINARY_DIR}/info_macros.cmake) 28 | 29 | # Here is where the action is. 30 | CREATE_INFO_SRC(${CMAKE_BINARY_DIR}/Docs) 31 | 32 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/cmake/os/Linux.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; version 2 of the License. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | # This file includes Linux specific options and quirks, related to system checks 18 | 19 | INCLUDE(CheckSymbolExists) 20 | 21 | # Something that needs to be set on legacy reasons 22 | SET(TARGET_OS_LINUX 1) 23 | SET(HAVE_NPTL 1) 24 | SET(_GNU_SOURCE 1) 25 | SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE=1) 26 | 27 | # Fix CMake (< 2.8) flags. -rdynamic exports too many symbols. 28 | FOREACH(LANG C CXX) 29 | STRING(REPLACE "-rdynamic" "" 30 | CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS 31 | ${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS} 32 | ) 33 | ENDFOREACH() 34 | 35 | # Ensure we have clean build for shared libraries 36 | # without unresolved symbols 37 | SET(LINK_FLAG_NO_UNDEFINED "-Wl,--no-undefined") 38 | 39 | # 64 bit file offset support flag 40 | SET(_FILE_OFFSET_BITS 64) 41 | 42 | # Linux specific HUGETLB /large page support 43 | CHECK_SYMBOL_EXISTS(SHM_HUGETLB sys/shm.h HAVE_DECL_SHM_HUGETLB) 44 | IF(HAVE_DECL_SHM_HUGETLB) 45 | SET(HAVE_LARGE_PAGES 1) 46 | SET(HUGETLB_USE_PROC_MEMINFO 1) 47 | SET(HAVE_LARGE_PAGE_OPTION 1) 48 | ENDIF() 49 | 50 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/cmake/stack_direction.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2009 Sun Microsystems, Inc. 3 | Use is subject to license terms. 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; version 2 of the License. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 17 | 18 | /* Check stack direction (0-down, 1-up) */ 19 | int f(int *a) 20 | { 21 | int b; 22 | return(&b > a)?1:0; 23 | } 24 | /* 25 | Prevent compiler optimizations by calling function 26 | through pointer. 27 | */ 28 | volatile int (*ptr_f)(int *) = f; 29 | int main() 30 | { 31 | int a; 32 | return ptr_f(&a); 33 | } 34 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/cmake/tags.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | # Generate tag files 17 | IF(UNIX) 18 | ADD_CUSTOM_TARGET (tags 19 | COMMAND support-files/build-tags 20 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 21 | ) 22 | ADD_CUSTOM_TARGET (ctags 23 | COMMAND ctags -R -f CTAGS 24 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 25 | ) 26 | ENDIF() 27 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/cmake/versioninfo.rc.in: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 2 | // 3 | // This program is free software; you can redistribute it and/or modify 4 | // it under the terms of the GNU General Public License as published by 5 | // the Free Software Foundation; version 2 of the License. 6 | // 7 | // This program is distributed in the hope that it will be useful, 8 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | // GNU General Public License for more details. 11 | // 12 | // You should have received a copy of the GNU General Public License 13 | // along with this program; if not, write to the Free Software 14 | // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | #include 17 | VS_VERSION_INFO VERSIONINFO 18 | FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@ 19 | PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,@TINY_VERSION@ 20 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 21 | FILEFLAGS 0 22 | FILEOS VOS__WINDOWS32 23 | FILETYPE @FILETYPE@ 24 | FILESUBTYPE VFT2_UNKNOWN 25 | BEGIN 26 | BLOCK "StringFileInfo" 27 | BEGIN 28 | BLOCK "040904E4" 29 | BEGIN 30 | VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0" 31 | VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.@TINY_VERSION@\0" 32 | END 33 | END 34 | BLOCK "VarFileInfo" 35 | BEGIN 36 | VALUE "Translation", 0x409, 1252 37 | END 38 | END 39 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/dbug/factorial.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int factorial ( 4 | register int value) 5 | { 6 | DBUG_ENTER ("factorial"); 7 | DBUG_PRINT ("find", ("find %d factorial", value)); 8 | if (value > 1) { 9 | value *= factorial (value - 1); 10 | } 11 | DBUG_PRINT ("result", ("result is %d", value)); 12 | DBUG_RETURN (value); 13 | } 14 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/dbug/my_main.c: -------------------------------------------------------------------------------- 1 | /* 2 | this is modified version of the original example main.c 3 | fixed so that it could compile and run in MySQL source tree 4 | */ 5 | 6 | #include /* This includes dbug.h */ 7 | #include 8 | #include 9 | 10 | int main (argc, argv) 11 | int argc; 12 | char *argv[]; 13 | { 14 | register int result, ix; 15 | extern int factorial(int); 16 | MY_INIT(argv[0]); 17 | 18 | { 19 | DBUG_ENTER ("main"); 20 | DBUG_PROCESS (argv[0]); 21 | for (ix = 1; ix < argc && argv[ix][0] == '-'; ix++) { 22 | switch (argv[ix][1]) { 23 | case '#': 24 | DBUG_PUSH (&(argv[ix][2])); 25 | break; 26 | } 27 | } 28 | for (; ix < argc; ix++) { 29 | DBUG_PRINT ("args", ("argv[%d] = %s", ix, argv[ix])); 30 | result = factorial (atoi(argv[ix])); 31 | printf ("%d\n", result); 32 | } 33 | DBUG_LEAVE; 34 | } 35 | my_end(0); 36 | exit(0); 37 | } 38 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/AUTHORS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/packages/mariadb/deps/libmariadbclient/extra/yassl/AUTHORS -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | INCLUDE_DIRECTORIES( 17 | ${CMAKE_SOURCE_DIR}/include 18 | ${CMAKE_SOURCE_DIR}/extra/yassl/include 19 | ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/include 20 | ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL) 21 | 22 | ADD_DEFINITIONS(${SSL_DEFINES}) 23 | IF(CMAKE_COMPILER_IS_GNUXX) 24 | #Remove -fno-implicit-templates 25 | #(yassl sources cannot be compiled with it) 26 | STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS 27 | ${CMAKE_CXX_FLAGS}) 28 | ENDIF() 29 | SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp 30 | src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp 31 | src/yassl_imp.cpp src/yassl_int.cpp) 32 | 33 | IF(HAVE_EXPLICIT_TEMPLATE_INSTANTIATION) 34 | SET(YASSL_SOURCES ${YASSL_SOURCES} src/template_instnt.cpp) 35 | ENDIF() 36 | 37 | ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES}) 38 | RESTRICT_SYMBOL_EXPORTS(yassl) 39 | 40 | 41 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/log.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2000-2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | 20 | /* yaSSL log interface 21 | * 22 | */ 23 | 24 | #ifndef yaSSL_LOG_HPP 25 | #define yaSSL_LOG_HPP 26 | 27 | #include "socket_wrapper.hpp" 28 | 29 | #ifdef YASSL_LOG 30 | #include 31 | #endif 32 | 33 | namespace yaSSL { 34 | 35 | typedef unsigned int uint; 36 | 37 | 38 | // Debug logger 39 | class Log { 40 | #ifdef YASSL_LOG 41 | FILE* log_; 42 | #endif 43 | public: 44 | explicit Log(const char* str = "yaSSL.log"); 45 | ~Log(); 46 | 47 | void Trace(const char*); 48 | void ShowTCP(socket_t, bool ended = false); 49 | void ShowData(uint, bool sent = false); 50 | }; 51 | 52 | 53 | } // naemspace 54 | 55 | #endif // yaSSL_LOG_HPP 56 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/crypto.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005, 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* crypto.h for openSSL */ 20 | 21 | #ifndef ysSSL_crypto_h__ 22 | #define yaSSL_crypto_h__ 23 | 24 | #ifdef YASSL_PREFIX 25 | #include "prefix_crypto.h" 26 | #endif 27 | 28 | const char* SSLeay_version(int type); 29 | 30 | #define SSLEAY_NUMBER_DEFINED 31 | #define SSLEAY_VERSION 0x0900L 32 | #define SSLEAY_VERSION_NUMBER SSLEAY_VERSION 33 | 34 | 35 | #endif /* yaSSL_crypto_h__ */ 36 | 37 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/des.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* des.h for openssl */ 20 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/des_old.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* des_old.h for openvn */ 20 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/engine.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* engine.h for libcurl */ 20 | 21 | #undef HAVE_OPENSSL_ENGINE_H 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/err.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005, 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* err.h for openssl */ 20 | 21 | #ifndef yaSSL_err_h__ 22 | #define yaSSL_err_h__ 23 | 24 | 25 | 26 | #endif /* yaSSL_err_h__ */ 27 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/evp.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* evp.h for openSSL */ 20 | 21 | #ifndef SSLEAY_NUMBER_DEFINED 22 | #define SSLEAY_NUMBER_DEFINED 23 | 24 | /* for OpenVPN */ 25 | #define SSLEAY_VERSION_NUMBER 0x0090700f 26 | 27 | 28 | #endif /* SSLEAY_NUMBER_DEFINED */ 29 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* hmac.h for openvpn */ 20 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/lhash.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* lhash.h for openSSL */ 20 | 21 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/md4.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* md4.h for libcurl */ 20 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/md5.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005, 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* md5.h for openssl */ 20 | 21 | #include "ssl.h" /* in there for now */ 22 | 23 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/objects.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* objects.h for openvpn */ 20 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* opensslv.h compatibility */ 20 | 21 | #ifndef yaSSL_opensslv_h__ 22 | #define yaSSL_opensslv_h__ 23 | 24 | 25 | /* api version compatibility */ 26 | #define OPENSSL_VERSION_NUMBER 0x0090700f 27 | 28 | 29 | #endif /* yaSSLopensslv_h__ */ 30 | 31 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/pem.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* pem.h for libcurl */ 20 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/pkcs12.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* pkcs12.h for libcurl */ 20 | 21 | 22 | #undef HAVE_OPENSSL_PKCS12_H 23 | 24 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/prefix_crypto.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | #define SSLeay_version yaSSLeay_version 20 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/rand.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* rand.h for openSSL */ 20 | 21 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/rsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2005, 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* rsa.h for openSSL */ 20 | 21 | 22 | #ifndef yaSSL_rsa_h__ 23 | #define yaSSL_rsa_h__ 24 | 25 | enum { RSA_F4 = 1 }; 26 | 27 | 28 | #endif /* yaSSL_rsa_h__ */ 29 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/sha.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* sha.h for openvpn */ 20 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/x509.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* x509.h for libcurl */ 20 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/openssl/x509v3.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2006 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* x509v3.h for libcurl */ 20 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/include/timer.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2000-2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* timer.hpp provides a high res and low res timers 20 | * 21 | */ 22 | 23 | 24 | #ifndef yaSSL_TIMER_HPP 25 | #define yaSSL_TIMER_HPP 26 | 27 | namespace yaSSL { 28 | 29 | typedef double timer_d; 30 | typedef unsigned int uint; 31 | 32 | 33 | 34 | timer_d timer(); 35 | uint lowResTimer(); 36 | 37 | 38 | 39 | } // namespace 40 | #endif // yaSSL_TIMER_HPP 41 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/src/dummy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | To make libtool always use a C++ linker when compiling with yaSSL we need 3 | to add a dummy C++ file to the source list. 4 | */ 5 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/taocrypt/README: -------------------------------------------------------------------------------- 1 | TaoCrypt release 0.9.2 02/5/2007 2 | 3 | 4 | This release includes bug fixes, portability enhancements, and some 5 | optimiations. 6 | 7 | See 0.9.0 for build instructions. 8 | 9 | 10 | 11 | 12 | ******************TaoCrypt release 0.9.0 09/18/2006 13 | 14 | This is the first release of TaoCrypt, it was previously only included with 15 | yaSSL. TaoCrypt is highly portable and fast, its features include: 16 | 17 | One way hash functions: SHA-1, MD2, MD4, MD5, RIPEMD-160 18 | Message authentication codes: HMAC 19 | Block Ciphers: DES, Triple-DES, AES, Blowfish, Twofish 20 | Stream Ciphers: ARC4 21 | Public Key Crypto: RSA, DSA, Diffie-Hellman 22 | Password based key derivation: PBKDF2 from PKCS #5 23 | Pseudo Random Number Generators 24 | Large Integer Support 25 | Base 16/64 encoding/decoding 26 | DER encoding/decoding 27 | X.509 processing 28 | SSE2 and ia32 asm for the right processors and compilers 29 | 30 | 31 | To build on Unix 32 | 33 | ./configure 34 | make 35 | 36 | To test the build, from the ./test directory run ./test 37 | 38 | 39 | On Windows 40 | 41 | Open the taocrypt project workspace 42 | Choose (Re)Build All 43 | 44 | To test the build, run the test executable 45 | 46 | 47 | Please send any questions or comments to todd@yassl.com. 48 | 49 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/taocrypt/include/arc4.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2000-2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* arc4.hpp defines ARC4 20 | */ 21 | 22 | 23 | #ifndef TAO_CRYPT_ARC4_HPP 24 | #define TAO_CRYPT_ARC4_HPP 25 | 26 | #include "misc.hpp" 27 | 28 | namespace TaoCrypt { 29 | 30 | 31 | // ARC4 encryption and decryption 32 | class ARC4 { 33 | public: 34 | enum { STATE_SIZE = 256 }; 35 | 36 | typedef ARC4 Encryption; 37 | typedef ARC4 Decryption; 38 | 39 | ARC4() {} 40 | 41 | void Process(byte*, const byte*, word32); 42 | void SetKey(const byte*, word32); 43 | private: 44 | byte x_; 45 | byte y_; 46 | byte state_[STATE_SIZE]; 47 | 48 | ARC4(const ARC4&); // hide copy 49 | const ARC4 operator=(const ARC4&); // and assign 50 | 51 | void AsmProcess(byte*, const byte*, word32); 52 | }; 53 | 54 | } // namespace 55 | 56 | 57 | #endif // TAO_CRYPT_ARC4_HPP 58 | 59 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/taocrypt/include/hc128.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* hc128.hpp defines HC128 20 | */ 21 | 22 | 23 | #ifndef TAO_CRYPT_HC128_HPP 24 | #define TAO_CRYPT_HC128_HPP 25 | 26 | #include "misc.hpp" 27 | 28 | namespace TaoCrypt { 29 | 30 | 31 | // HC128 encryption and decryption 32 | class HC128 { 33 | public: 34 | 35 | typedef HC128 Encryption; 36 | typedef HC128 Decryption; 37 | 38 | 39 | HC128() {} 40 | 41 | void Process(byte*, const byte*, word32); 42 | void SetKey(const byte*, const byte*); 43 | private: 44 | word32 T_[1024]; /* P[i] = T[i]; Q[i] = T[1024 + i ]; */ 45 | word32 X_[16]; 46 | word32 Y_[16]; 47 | word32 counter1024_; /* counter1024 = i mod 1024 at the ith step */ 48 | word32 key_[8]; 49 | word32 iv_[8]; 50 | 51 | void SetIV(const byte*); 52 | void GenerateKeystream(word32*); 53 | void SetupUpdate(); 54 | 55 | HC128(const HC128&); // hide copy 56 | const HC128 operator=(const HC128&); // and assign 57 | }; 58 | 59 | } // namespace 60 | 61 | 62 | #endif // TAO_CRYPT_HC128_HPP 63 | 64 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/taocrypt/include/kernelc.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* kernelc.hpp provides support for C std lib when compiled in kernel mode 20 | */ 21 | 22 | #ifndef TAOCRYPT_KERNELC_HPP 23 | #define TAOCRYPT_KERNELC_HPP 24 | 25 | #include // get right size_t 26 | 27 | // system functions that c++ doesn't like headers for 28 | 29 | extern "C" void* memcpy(void*, const void*, size_t); 30 | extern "C" void* memset(void*, int, size_t); 31 | extern "C" void printk(char *fmt, ...); 32 | 33 | 34 | #endif // TAOCRYPT_KERNELC_HPP 35 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/taocrypt/include/md2.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2000-2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* md2.hpp provides MD2 digest support, see RFC 1319 20 | */ 21 | 22 | #ifndef TAO_CRYPT_MD2_HPP 23 | #define TAO_CRYPT_MD2_HPP 24 | 25 | 26 | #include "hash.hpp" 27 | #include "block.hpp" 28 | 29 | 30 | namespace TaoCrypt { 31 | 32 | 33 | // MD2 digest 34 | class MD2 : public HASH { 35 | public: 36 | enum { BLOCK_SIZE = 16, DIGEST_SIZE = 16, PAD_SIZE = 16, X_SIZE = 48 }; 37 | MD2(); 38 | 39 | word32 getBlockSize() const { return BLOCK_SIZE; } 40 | word32 getDigestSize() const { return DIGEST_SIZE; } 41 | 42 | void Update(const byte*, word32); 43 | void Final(byte*); 44 | 45 | void Init(); 46 | void Swap(MD2&); 47 | private: 48 | ByteBlock X_, C_, buffer_; 49 | word32 count_; // bytes % PAD_SIZE 50 | 51 | MD2(const MD2&); 52 | MD2& operator=(const MD2&); 53 | }; 54 | 55 | inline void swap(MD2& a, MD2& b) 56 | { 57 | a.Swap(b); 58 | } 59 | 60 | 61 | } // namespace 62 | 63 | #endif // TAO_CRYPT_MD2_HPP 64 | 65 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/taocrypt/include/rabbit.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* rabbit.hpp defines Rabbit 20 | */ 21 | 22 | 23 | #ifndef TAO_CRYPT_RABBIT_HPP 24 | #define TAO_CRYPT_RABBIT_HPP 25 | 26 | #include "misc.hpp" 27 | 28 | namespace TaoCrypt { 29 | 30 | 31 | // Rabbit encryption and decryption 32 | class Rabbit { 33 | public: 34 | 35 | typedef Rabbit Encryption; 36 | typedef Rabbit Decryption; 37 | 38 | enum RabbitCtx { Master = 0, Work = 1 }; 39 | 40 | Rabbit() {} 41 | 42 | void Process(byte*, const byte*, word32); 43 | void SetKey(const byte*, const byte*); 44 | private: 45 | struct Ctx { 46 | word32 x[8]; 47 | word32 c[8]; 48 | word32 carry; 49 | }; 50 | 51 | Ctx masterCtx_; 52 | Ctx workCtx_; 53 | 54 | void NextState(RabbitCtx); 55 | void SetIV(const byte*); 56 | 57 | Rabbit(const Rabbit&); // hide copy 58 | const Rabbit operator=(const Rabbit&); // and assign 59 | }; 60 | 61 | } // namespace 62 | 63 | 64 | #endif // TAO_CRYPT_RABBIT_HPP 65 | 66 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/taocrypt/include/runtime.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2005, 2012, Oracle and/or its affiliates 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* runtime.hpp provides C++ runtime support functions when building a pure C 20 | * version of yaSSL, user must define YASSL_PURE_C 21 | */ 22 | 23 | 24 | 25 | #ifndef yaSSL_NEW_HPP 26 | #define yaSSL_NEW_HPP 27 | 28 | #ifdef HAVE_CONFIG_H 29 | #include "config.h" 30 | #endif 31 | 32 | #ifdef __sun 33 | 34 | 35 | // Handler for pure virtual functions 36 | namespace __Crun { 37 | void pure_error(void); 38 | } // namespace __Crun 39 | 40 | #endif // __sun 41 | 42 | 43 | #if defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) 44 | 45 | #if __GNUC__ > 2 46 | 47 | extern "C" { 48 | #if defined(DO_TAOCRYPT_KERNEL_MODE) 49 | #include "kernelc.hpp" 50 | #endif 51 | int __cxa_pure_virtual () __attribute__ ((weak)); 52 | } // extern "C" 53 | 54 | #endif // __GNUC__ > 2 55 | #endif // compiler check 56 | #endif // yaSSL_NEW_HPP 57 | 58 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/taocrypt/mySTL/pair.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2000-2007 MySQL AB 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | 20 | /* mySTL pair implements pair 21 | * 22 | */ 23 | 24 | #ifndef mySTL_PAIR_HPP 25 | #define mySTL_PAIR_HPP 26 | 27 | 28 | 29 | namespace mySTL { 30 | 31 | 32 | template 33 | struct pair { 34 | typedef T1 first_type; 35 | typedef T2 second_type; 36 | 37 | first_type first; 38 | second_type second; 39 | 40 | pair() {} 41 | pair(const T1& t1, const T2& t2) : first(t1), second(t2) {} 42 | 43 | template 44 | pair(const pair& p) : first(p.first), second(p.second) {} 45 | }; 46 | 47 | 48 | template 49 | inline pair make_pair(const T1& a, const T2& b) 50 | { 51 | return pair(a, b); 52 | } 53 | 54 | 55 | 56 | } // namespace mySTL 57 | 58 | #endif // mySTL_PAIR_HPP 59 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/extra/yassl/taocrypt/src/aestables.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; see the file COPYING. If not, write to the 15 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 16 | MA 02110-1301 USA. 17 | */ 18 | 19 | /* based on Wei Dai's aestables.cpp from CryptoPP */ 20 | 21 | #include "runtime.hpp" 22 | #include "aes.hpp" 23 | 24 | 25 | namespace TaoCrypt { 26 | 27 | 28 | const word32 AES::rcon_[] = { 29 | 0x01000000, 0x02000000, 0x04000000, 0x08000000, 30 | 0x10000000, 0x20000000, 0x40000000, 0x80000000, 31 | 0x1B000000, 0x36000000, 32 | /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ 33 | }; 34 | 35 | 36 | } // namespace 37 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/atomic/gcc_builtins.h: -------------------------------------------------------------------------------- 1 | #ifndef ATOMIC_GCC_BUILTINS_INCLUDED 2 | #define ATOMIC_GCC_BUILTINS_INCLUDED 3 | 4 | /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; version 2 of the License. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 18 | 19 | #define make_atomic_add_body(S) \ 20 | v= __sync_fetch_and_add(a, v); 21 | #define make_atomic_fas_body(S) \ 22 | v= __sync_lock_test_and_set(a, v); 23 | #define make_atomic_cas_body(S) \ 24 | int ## S sav; \ 25 | int ## S cmp_val= *cmp; \ 26 | sav= __sync_val_compare_and_swap(a, cmp_val, set);\ 27 | if (!(ret= (sav == cmp_val))) *cmp= sav 28 | 29 | #ifdef MY_ATOMIC_MODE_DUMMY 30 | #define make_atomic_load_body(S) ret= *a 31 | #define make_atomic_store_body(S) *a= v 32 | #define MY_ATOMIC_MODE "gcc-builtins-up" 33 | 34 | #else 35 | #define MY_ATOMIC_MODE "gcc-builtins-smp" 36 | #define make_atomic_load_body(S) \ 37 | ret= __sync_fetch_and_or(a, 0); 38 | #define make_atomic_store_body(S) \ 39 | (void) __sync_lock_test_and_set(a, v); 40 | #endif 41 | 42 | #endif /* ATOMIC_GCC_BUILTINS_INCLUDED */ 43 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/base64.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2003-2006 MySQL AB 2 | Use is subject to license terms 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 16 | 17 | #ifndef __BASE64_H_INCLUDED__ 18 | #define __BASE64_H_INCLUDED__ 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | /* 25 | Calculate how much memory needed for dst of base64_encode() 26 | */ 27 | int base64_needed_encoded_length(int length_of_data); 28 | 29 | /* 30 | Calculate how much memory needed for dst of base64_decode() 31 | */ 32 | int base64_needed_decoded_length(int length_of_encoded_data); 33 | 34 | /* 35 | Encode data as a base64 string 36 | */ 37 | int base64_encode(const void *src, size_t src_len, char *dst); 38 | 39 | /* 40 | Decode a base64 string into data 41 | */ 42 | int base64_decode(const char *src, size_t src_len, 43 | void *dst, const char **end_ptr); 44 | 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | #endif /* !__BASE64_H_INCLUDED__ */ 50 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/handler_state.h: -------------------------------------------------------------------------------- 1 | /* 2 | Map handler error message to sql states. Note that this list MUST be in 3 | increasing order! 4 | See sql_state.c for usage 5 | */ 6 | 7 | { HA_ERR_KEY_NOT_FOUND, "02000", "" }, 8 | { HA_ERR_FOUND_DUPP_KEY, "23000", "" }, 9 | { HA_ERR_WRONG_COMMAND, "0A000", "" }, 10 | { HA_ERR_UNSUPPORTED, "0A000", "" }, 11 | { HA_WRONG_CREATE_OPTION, "0A000", "" }, 12 | { HA_ERR_FOUND_DUPP_UNIQUE, "23000", "" }, 13 | { HA_ERR_UNKNOWN_CHARSET, "0A000", "" }, 14 | { HA_ERR_READ_ONLY_TRANSACTION, "25000", "" }, 15 | { HA_ERR_LOCK_DEADLOCK, "40001", "" }, 16 | { HA_ERR_NO_REFERENCED_ROW, "23000", "" }, 17 | { HA_ERR_ROW_IS_REFERENCED, "23000", "" }, 18 | { HA_ERR_TABLE_EXIST, "42S01", "" }, 19 | { HA_ERR_FOREIGN_DUPLICATE_KEY, "23000", "" }, 20 | { HA_ERR_TABLE_READONLY, "25000", "" }, 21 | { HA_ERR_AUTOINC_ERANGE, "22003", "" }, 22 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/my_decimal_limits.h: -------------------------------------------------------------------------------- 1 | #ifndef MY_DECIMAL_LIMITS_INCLUDED 2 | #define MY_DECIMAL_LIMITS_INCLUDED 3 | /* Copyright (c) 2011 Monty Program Ab 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; version 2 of the License. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 17 | 18 | #define DECIMAL_LONGLONG_DIGITS 22 19 | #define DECIMAL_LONG_DIGITS 10 20 | #define DECIMAL_LONG3_DIGITS 8 21 | 22 | /** maximum length of buffer in our big digits (uint32). */ 23 | #define DECIMAL_BUFF_LENGTH 9 24 | 25 | /* the number of digits that my_decimal can possibly contain */ 26 | #define DECIMAL_MAX_POSSIBLE_PRECISION (DECIMAL_BUFF_LENGTH * 9) 27 | 28 | 29 | /** 30 | maximum guaranteed precision of number in decimal digits (number of our 31 | digits * number of decimal digits in one our big digit - number of decimal 32 | digits in one our big digit decreased by 1 (because we always put decimal 33 | point on the border of our big digits)) 34 | */ 35 | #define DECIMAL_MAX_PRECISION (DECIMAL_MAX_POSSIBLE_PRECISION - 8*2) 36 | #define DECIMAL_MAX_SCALE 30 37 | #define DECIMAL_NOT_SPECIFIED 31 38 | 39 | /** 40 | maximum length of string representation (number of maximum decimal 41 | digits + 1 position for sign + 1 position for decimal point, no terminator) 42 | */ 43 | #define DECIMAL_MAX_STR_LENGTH (DECIMAL_MAX_POSSIBLE_PRECISION + 2) 44 | 45 | #endif /* MY_DECIMAL_LIMITS_INCLUDED */ 46 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/my_libwrap.h: -------------------------------------------------------------------------------- 1 | #ifndef MY_LIBWRAP_INCLUDED 2 | #define MY_LIBWRAP_INCLUDED 3 | 4 | /* Copyright (c) 2000, 2006 MySQL AB, 2009 Sun Microsystems, Inc. 5 | Use is subject to license terms. 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; version 2 of the License. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | 20 | #ifdef HAVE_LIBWRAP 21 | #include 22 | #include 23 | #ifdef NEED_SYS_SYSLOG_H 24 | #include 25 | #endif /* NEED_SYS_SYSLOG_H */ 26 | 27 | extern void my_fromhost(struct request_info *req); 28 | extern int my_hosts_access(struct request_info *req); 29 | extern char *my_eval_client(struct request_info *req); 30 | 31 | #endif /* HAVE_LIBWRAP */ 32 | #endif /* MY_LIBWRAP_INCLUDED */ 33 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/my_list.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef _list_h_ 17 | #define _list_h_ 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | typedef struct st_list { 24 | struct st_list *prev,*next; 25 | void *data; 26 | } LIST; 27 | 28 | typedef int (*list_walk_action)(void *,void *); 29 | 30 | extern LIST *list_add(LIST *root,LIST *element); 31 | extern LIST *list_delete(LIST *root,LIST *element); 32 | extern LIST *list_cons(void *data,LIST *root); 33 | extern LIST *list_reverse(LIST *root); 34 | extern void list_free(LIST *root,unsigned int free_data); 35 | extern unsigned int list_length(LIST *); 36 | extern int list_walk(LIST *,list_walk_action action,unsigned char * argument); 37 | 38 | #define list_rest(a) ((a)->next) 39 | #define list_push(a,b) (a)=list_cons((b),(a)) 40 | #define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old); my_free(old); } 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | #endif 46 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/my_nosys.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | /* 17 | Header to remove use of my_functions in functions where we need speed and 18 | where calls to posix functions should work 19 | */ 20 | #ifndef _my_nosys_h 21 | #define _my_nosys_h 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | #ifndef __MY_NOSYS__ 27 | #define __MY_NOSYS__ 28 | 29 | #ifndef HAVE_STDLIB_H 30 | #include 31 | #endif 32 | 33 | #undef my_read 34 | #undef my_write 35 | #undef my_seek 36 | #define my_read(a,b,c,d) my_quick_read(a,b,c,d) 37 | #define my_write(a,b,c,d) my_quick_write(a,b,c) 38 | extern size_t my_quick_read(File Filedes,uchar *Buffer,size_t Count, 39 | myf myFlags); 40 | extern size_t my_quick_write(File Filedes,const uchar *Buffer,size_t Count); 41 | 42 | #endif /* __MY_NOSYS__ */ 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | #endif 48 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/my_user.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2005-2007 MySQL AB 2 | Use is subject to license terms 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 16 | 17 | /* 18 | This is a header for libraries containing functions used in both server and 19 | only some of clients (but not in libmysql)... 20 | */ 21 | 22 | #ifndef _my_user_h_ 23 | #define _my_user_h_ 24 | 25 | #include 26 | 27 | C_MODE_START 28 | 29 | void parse_user(const char *user_id_str, size_t user_id_len, 30 | char *user_name_str, size_t *user_name_len, 31 | char *host_name_str, size_t *host_name_len); 32 | 33 | C_MODE_END 34 | 35 | #endif /* _my_user_h_ */ 36 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/mysql/psi/psi_abi_v1.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software Foundation, 14 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 15 | 16 | /** 17 | @file mysql/psi/psi_abi_v1.h 18 | ABI check for mysql/psi/psi.h, when using PSI_VERSION_1. 19 | This file is only used to automate detection of changes between versions. 20 | Do not include this file, include mysql/psi/psi.h instead. 21 | */ 22 | #define USE_PSI_1 23 | #define HAVE_PSI_INTERFACE 24 | #define _global_h 25 | #include "mysql/psi/psi.h" 26 | 27 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/mysql/psi/psi_abi_v2.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software Foundation, 14 | 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ 15 | 16 | /** 17 | @file mysql/psi/psi_abi_v1.h 18 | ABI check for mysql/psi/psi.h, when using PSI_VERSION_2. 19 | This file is only used to automate detection of changes between versions. 20 | Do not include this file, include mysql/psi/psi.h instead. 21 | */ 22 | #define USE_PSI_2 23 | #define HAVE_PSI_INTERFACE 24 | #define _global_h 25 | #include "mysql/psi/psi.h" 26 | 27 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/mysql/services.h: -------------------------------------------------------------------------------- 1 | #ifndef MYSQL_SERVICES_INCLUDED 2 | /* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #define MYSQL_SERVICES_INCLUDED 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/mysql_async.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2012 MariaDB Services and Kristian Nielsen 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | /* Common definitions for MariaDB non-blocking client library. */ 17 | 18 | #ifndef MYSQL_ASYNC_H 19 | #define MYSQL_ASYNC_H 20 | 21 | extern int my_connect_async(struct mysql_async_context *b, my_socket fd, 22 | const struct sockaddr *name, uint namelen, 23 | uint timeout); 24 | extern ssize_t my_recv_async(struct mysql_async_context *b, int fd, 25 | unsigned char *buf, size_t size, uint timeout); 26 | extern ssize_t my_send_async(struct mysql_async_context *b, int fd, 27 | const unsigned char *buf, size_t size, 28 | uint timeout); 29 | extern my_bool my_poll_read_async(struct mysql_async_context *b, 30 | uint timeout); 31 | #ifdef HAVE_OPENSSL 32 | extern int my_ssl_read_async(struct mysql_async_context *b, SSL *ssl, 33 | void *buf, int size); 34 | extern int my_ssl_write_async(struct mysql_async_context *b, SSL *ssl, 35 | const void *buf, int size); 36 | #endif 37 | 38 | #endif /* MYSQL_ASYNC_H */ 39 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/mysql_embed.h: -------------------------------------------------------------------------------- 1 | #ifndef MYSQL_EMBED_INCLUDED 2 | #define MYSQL_EMBED_INCLUDED 3 | 4 | /* 5 | Copyright (c) 2000, 2011, Oracle and/or its affiliates. 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; version 2 of the License. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | 20 | /* Defines that are unique to the embedded version of MySQL */ 21 | 22 | #ifdef EMBEDDED_LIBRARY 23 | 24 | /* Things we don't need in the embedded version of MySQL */ 25 | /* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */ 26 | 27 | #undef HAVE_DLOPEN /* No udf functions */ 28 | #undef HAVE_SMEM /* No shared memory */ 29 | 30 | #endif /* EMBEDDED_LIBRARY */ 31 | #endif /* MYSQL_EMBED_INCLUDED */ 32 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/mysql_version.h.in: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 1996, 1999-2004, 2007 MySQL AB 2 | Use is subject to license terms 3 | This file is public domain and comes with NO WARRANTY of any kind */ 4 | 5 | /* Version numbers for protocol & mysqld */ 6 | 7 | #ifndef _mysql_version_h 8 | #define _mysql_version_h 9 | #ifdef _CUSTOMCONFIG_ 10 | #include 11 | #else 12 | #define PROTOCOL_VERSION @PROTOCOL_VERSION@ 13 | #define MYSQL_SERVER_VERSION "@VERSION@-MariaDB" 14 | #define MYSQL_BASE_VERSION "mysqld-@MYSQL_BASE_VERSION@" 15 | #define MARIADB_BASE_VERSION "mariadb-@MYSQL_BASE_VERSION@" 16 | #define MYSQL_SERVER_SUFFIX_DEF "@MYSQL_SERVER_SUFFIX@" 17 | #define FRM_VER @DOT_FRM_VERSION@ 18 | #define MYSQL_VERSION_ID @MYSQL_VERSION_ID@ 19 | #define MYSQL_PORT @MYSQL_TCP_PORT@ 20 | #define MYSQL_PORT_DEFAULT @MYSQL_TCP_PORT_DEFAULT@ 21 | #define MYSQL_UNIX_ADDR "@MYSQL_UNIX_ADDR@" 22 | #define MYSQL_CONFIG_NAME "my" 23 | #define MYSQL_COMPILATION_COMMENT "@COMPILATION_COMMENT@" 24 | 25 | /* mysqld compile time options */ 26 | #endif /* _CUSTOMCONFIG_ */ 27 | 28 | #ifndef LICENSE 29 | #define LICENSE GPL 30 | #endif /* LICENSE */ 31 | 32 | #endif /* _mysql_version_h */ 33 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/mysqld_default_groups.h: -------------------------------------------------------------------------------- 1 | const char *load_default_groups[]= { 2 | #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE 3 | "mysql_cluster", 4 | #endif 5 | "mysqld", "server", MYSQL_BASE_VERSION, 6 | "mariadb", MARIADB_BASE_VERSION, 7 | "client-server", 8 | 0, 0}; 9 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/password.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifndef PASSWORD_INCLUDED 17 | #define PASSWORD_INCLUDED 18 | 19 | #include "my_global.h" 20 | 21 | C_MODE_START 22 | 23 | void my_make_scrambled_password_323(char *to, const char *password, 24 | size_t pass_len); 25 | void my_make_scrambled_password(char *to, const char *password, 26 | size_t pass_len); 27 | 28 | void hash_password(ulong *result, const char *password, uint password_len); 29 | 30 | C_MODE_END 31 | 32 | #endif /* PASSWORD_INCLUDED */ 33 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/probes_mysql.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2008 Sun Microsystems, Inc. 2 | Use is subject to license terms. 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 16 | 17 | #ifndef PROBES_MYSQL_H 18 | 19 | #define PROBES_MYSQL_H 20 | 21 | #if defined(HAVE_DTRACE) && !defined(DISABLE_DTRACE) 22 | #include "probes_mysql_dtrace.h" 23 | #else /* no dtrace */ 24 | #include "probes_mysql_nodtrace.h" 25 | #endif 26 | #endif /* PROBES_MYSQL_H */ 27 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/rijndael.h: -------------------------------------------------------------------------------- 1 | #ifndef RIJNDAEL_INCLUDED 2 | #define RIJNDAEL_INCLUDED 3 | 4 | /* Copyright (c) 2002, 2006 MySQL AB, 2009 Sun Microsystems, Inc. 5 | Use is subject to license terms. 6 | 7 | This program is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; version 2 of the License. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 19 | 20 | 21 | /* 22 | rijndael-alg-fst.h 23 | 24 | @version 3.0 (December 2000) 25 | Optimised ANSI C code for the Rijndael cipher (now AES) 26 | @author Vincent Rijmen 27 | @author Antoon Bosselaers 28 | @author Paulo Barreto 29 | 30 | This code is hereby placed in the public domain. 31 | Modified by Peter Zaitsev to fit MySQL coding style. 32 | */ 33 | 34 | #define AES_MAXKC (256/32) 35 | #define AES_MAXKB (256/8) 36 | #define AES_MAXNR 14 37 | 38 | int rijndaelKeySetupEnc(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[], 39 | int keyBits); 40 | int rijndaelKeySetupDec(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[], 41 | int keyBits); 42 | void rijndaelEncrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr, 43 | const uint8 pt[16], uint8 ct[16]); 44 | void rijndaelDecrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr, 45 | const uint8 ct[16], uint8 pt[16]); 46 | 47 | #endif /* RIJNDAEL_INCLUDED */ 48 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/service_versions.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #ifdef _WIN32 17 | #define SERVICE_VERSION __declspec(dllexport) void * 18 | #else 19 | #define SERVICE_VERSION void * 20 | #endif 21 | 22 | #define VERSION_my_snprintf 0x0100 23 | #define VERSION_thd_alloc 0x0100 24 | #define VERSION_thd_wait 0x0100 25 | #define VERSION_my_thread_scheduler 0x0100 26 | #define VERSION_progress_report 0x0100 27 | #define VERSION_debug_sync 0x1000 28 | #define VERSION_kill_statement 0x1000 29 | 30 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/sslopt-case.h: -------------------------------------------------------------------------------- 1 | #ifndef SSLOPT_CASE_INCLUDED 2 | #define SSLOPT_CASE_INCLUDED 3 | 4 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; version 2 of the License. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 18 | 19 | #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) 20 | case OPT_SSL_KEY: 21 | case OPT_SSL_CERT: 22 | case OPT_SSL_CA: 23 | case OPT_SSL_CAPATH: 24 | case OPT_SSL_CIPHER: 25 | /* 26 | Enable use of SSL if we are using any ssl option 27 | One can disable SSL later by using --skip-ssl or --ssl=0 28 | */ 29 | opt_use_ssl= 1; 30 | break; 31 | #endif 32 | #endif /* SSLOPT_CASE_INCLUDED */ 33 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/sslopt-vars.h: -------------------------------------------------------------------------------- 1 | #ifndef SSLOPT_VARS_INCLUDED 2 | #define SSLOPT_VARS_INCLUDED 3 | 4 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; version 2 of the License. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 18 | 19 | #if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY) 20 | #ifdef SSL_VARS_NOT_STATIC 21 | #define SSL_STATIC 22 | #else 23 | #define SSL_STATIC static 24 | #endif 25 | SSL_STATIC my_bool opt_use_ssl = 0; 26 | SSL_STATIC char *opt_ssl_ca = 0; 27 | SSL_STATIC char *opt_ssl_capath = 0; 28 | SSL_STATIC char *opt_ssl_cert = 0; 29 | SSL_STATIC char *opt_ssl_cipher = 0; 30 | SSL_STATIC char *opt_ssl_key = 0; 31 | #ifdef MYSQL_CLIENT 32 | SSL_STATIC my_bool opt_ssl_verify_server_cert= 0; 33 | #endif 34 | #endif 35 | #endif /* SSLOPT_VARS_INCLUDED */ 36 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/welcome_copyright_notice.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011, 2012, Oracle and/or its affiliates. 2 | Copyright (c) 2011, 2012, Monty Program Ab 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 16 | 17 | #ifndef _welcome_copyright_notice_h_ 18 | #define _welcome_copyright_notice_h_ 19 | 20 | #define COPYRIGHT_NOTICE_CURRENT_YEAR "2013" 21 | 22 | /* 23 | This define specifies copyright notice which is displayed by every MySQL 24 | program on start, or on help screen. 25 | */ 26 | #define ORACLE_WELCOME_COPYRIGHT_NOTICE(first_year) \ 27 | "Copyright (c) " first_year ", " COPYRIGHT_NOTICE_CURRENT_YEAR \ 28 | ", Oracle, Monty Program Ab and others.\n" 29 | 30 | #endif /* _welcome_copyright_notice_h_ */ 31 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/include/wqueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2007, 2008, Sun Microsystems, Inc, 3 | Copyright (c) 2011, 2012, Monty Program Ab 4 | 5 | This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; version 2 of the License. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program; if not, write to the Free Software 16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 17 | 18 | #ifndef WQUEUE_INCLUDED 19 | #define WQUEUE_INCLUDED 20 | 21 | #include 22 | #include 23 | 24 | /* info about requests in a waiting queue */ 25 | typedef struct st_pagecache_wqueue 26 | { 27 | struct st_my_thread_var *last_thread; /* circular list of waiting 28 | threads */ 29 | } WQUEUE; 30 | 31 | void wqueue_link_into_queue(WQUEUE *wqueue, struct st_my_thread_var *thread); 32 | void wqueue_unlink_from_queue(WQUEUE *wqueue, struct st_my_thread_var *thread); 33 | void wqueue_add_to_queue(WQUEUE *wqueue, struct st_my_thread_var *thread); 34 | void wqueue_add_and_wait(WQUEUE *wqueue, 35 | struct st_my_thread_var *thread, 36 | mysql_mutex_t *lock); 37 | void wqueue_release_queue(WQUEUE *wqueue); 38 | void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/checksum.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | ulong my_crc_dbug_check= ~0; /* Cannot happen */ 22 | 23 | /* 24 | Calculate a long checksum for a memoryblock. 25 | 26 | SYNOPSIS 27 | my_checksum() 28 | crc start value for crc 29 | pos pointer to memory block 30 | length length of the block 31 | */ 32 | 33 | ha_checksum my_checksum(ha_checksum crc, const uchar *pos, size_t length) 34 | { 35 | crc= (ha_checksum) crc32((uint)crc, pos, (uint) length); 36 | DBUG_PRINT("info", ("crc: %lu", (ulong) crc)); 37 | if ((ulong)crc == my_crc_dbug_check) 38 | my_debug_put_break_here(); 39 | return crc; 40 | } 41 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/mf_fn_ext.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | 17 | #include "mysys_priv.h" 18 | #include 19 | 20 | /* 21 | Return a pointer to the extension of the filename. 22 | 23 | SYNOPSIS 24 | fn_ext() 25 | name Name of file 26 | 27 | DESCRIPTION 28 | The extension is defined as everything after the first extension character 29 | (normally '.') after the directory name. 30 | 31 | RETURN VALUES 32 | Pointer to to the extension character. If there isn't any extension, 33 | points at the end ASCII(0) of the filename. 34 | */ 35 | 36 | char *fn_ext(const char *name) 37 | { 38 | register const char *pos, *gpos; 39 | DBUG_ENTER("fn_ext"); 40 | DBUG_PRINT("mfunkt",("name: '%s'",name)); 41 | 42 | #if defined(FN_DEVCHAR) || defined(BASKSLASH_MBTAIL) 43 | { 44 | char buff[FN_REFLEN]; 45 | size_t res_length; 46 | gpos= name+ dirname_part(buff,(char*) name, &res_length); 47 | } 48 | #else 49 | if (!(gpos= strrchr(name, FN_LIBCHAR))) 50 | gpos= name; 51 | #endif 52 | pos=strchr(gpos,FN_EXTCHAR); 53 | DBUG_RETURN((char*) (pos ? pos : strend(gpos))); 54 | } /* fn_ext */ 55 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/mf_qsort2.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | /* qsort that sends one extra argument to the compare subrutine */ 17 | 18 | #define QSORT_EXTRA_CMP_ARGUMENT 19 | #include "mf_qsort.c" 20 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/mf_same.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | /* Kopierar biblioteksstrukturen och extensionen fr}n ett filnamn */ 17 | 18 | #include "mysys_priv.h" 19 | #include 20 | 21 | /* 22 | Copy directory and/or extension between filenames. 23 | (For the meaning of 'flag', check mf_format.c) 24 | 'to' may be equal to 'name'. 25 | Returns 'to'. 26 | */ 27 | 28 | char * fn_same(char *to, const char *name, int flag) 29 | { 30 | char dev[FN_REFLEN]; 31 | const char *ext; 32 | size_t dev_length; 33 | DBUG_ENTER("fn_same"); 34 | DBUG_PRINT("enter",("to: %s name: %s flag: %d",to,name,flag)); 35 | 36 | if ((ext=strrchr(name+dirname_part(dev, name, &dev_length),FN_EXTCHAR)) == 0) 37 | ext=""; 38 | 39 | DBUG_RETURN(fn_format(to,to,dev,ext,flag)); 40 | } /* fn_same */ 41 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/mf_sort.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | /* Sort of string pointers in string-order with radix or qsort */ 17 | 18 | #include "mysys_priv.h" 19 | #include 20 | 21 | void my_string_ptr_sort(uchar *base, uint items, size_t size) 22 | { 23 | #if INT_MAX > 65536L 24 | uchar **ptr=0; 25 | 26 | if (size <= 20 && items >= 1000 && items < 100000 && 27 | (ptr= (uchar**) my_malloc(items*sizeof(char*),MYF(0)))) 28 | { 29 | radixsort_for_str_ptr((uchar**) base,items,size,ptr); 30 | my_free(ptr); 31 | } 32 | else 33 | #endif 34 | { 35 | if (size && items) 36 | { 37 | my_qsort2(base,items, sizeof(uchar*), get_ptr_compare(size), 38 | (void*) &size); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/mf_unixpath.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include "mysys_priv.h" 17 | #include 18 | 19 | /** 20 | Convert filename to unix style filename. 21 | 22 | @remark On Windows, converts '\' to '/'. 23 | 24 | @param to A pathname. 25 | */ 26 | 27 | void to_unix_path(char *to __attribute__((unused))) 28 | { 29 | #if FN_LIBCHAR != '/' 30 | { 31 | to--; 32 | while ((to=strchr(to+1,FN_LIBCHAR)) != 0) 33 | *to='/'; 34 | } 35 | #endif 36 | } 37 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/my_alarm.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | /* Function to set a varible when we got a alarm */ 17 | /* Used by my_lock samt functions in m_alarm.h */ 18 | 19 | 20 | #include "mysys_priv.h" 21 | #include "my_alarm.h" 22 | 23 | #ifdef HAVE_ALARM 24 | 25 | /* ARGSUSED */ 26 | sig_handler my_set_alarm_variable(int signo __attribute__((unused))) 27 | { 28 | my_have_got_alarm=1; /* Tell program that time expired */ 29 | return; 30 | } 31 | 32 | #endif /* HAVE_ALARM */ 33 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/my_basename.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2011 Monty Program Ab 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include 17 | /** 18 | @brief retrieve last component of the filename. 19 | Loosely based on Single Unix Spec definition. 20 | 21 | @fn my_basename() 22 | @param filename Filename 23 | */ 24 | const char *my_basename(const char *filename) 25 | { 26 | const char *last; 27 | const char *s=filename; 28 | 29 | /* Handle basename()'s special cases, as per single unix spec */ 30 | if (!filename || !filename[0]) 31 | return "."; 32 | if(filename[0] == '/' && filename[1]== '\0') 33 | return filename; 34 | 35 | for(last= s; *s; s++) 36 | { 37 | if (*s == '/' || *s == '\\') 38 | last= s + 1; 39 | } 40 | return last; 41 | } 42 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/my_chmod.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | #include "mysys_priv.h" 17 | #include "mysys_err.h" 18 | 19 | /** 20 | @brief Change mode of file. 21 | 22 | @fn my_chmod() 23 | @param name Filename 24 | @param mode_t Mode 25 | @param my_flags Flags 26 | 27 | @notes 28 | The mode of the file given by path or referenced by fildes is changed 29 | 30 | @retval 0 Ok 31 | @retval # Error 32 | */ 33 | 34 | int my_chmod(const char *name, mode_t mode, myf my_flags) 35 | { 36 | DBUG_ENTER("my_chmod"); 37 | DBUG_PRINT("my",("name: %s mode: %lu flags: %d", name, (ulong) mode, 38 | my_flags)); 39 | 40 | if (chmod(name, mode)) 41 | { 42 | my_errno= errno; 43 | if (my_flags & MY_WME) 44 | my_error(EE_CANT_CHMOD, MYF(0), name, (ulong) mode, my_errno); 45 | DBUG_RETURN(1); 46 | } 47 | DBUG_RETURN(0); 48 | } 49 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/my_div.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | #include "mysys_priv.h" 17 | 18 | /* 19 | Get filename of file 20 | 21 | SYNOPSIS 22 | my_filename() 23 | fd File descriptor 24 | */ 25 | 26 | char * my_filename(File fd) 27 | { 28 | DBUG_ENTER("my_filename"); 29 | if ((uint) fd >= (uint) my_file_limit) 30 | DBUG_RETURN((char*) "UNKNOWN"); 31 | if (fd >= 0 && my_file_info[fd].type != UNOPEN) 32 | { 33 | DBUG_RETURN(my_file_info[fd].name); 34 | } 35 | else 36 | DBUG_RETURN((char*) "UNOPENED"); /* Debug message */ 37 | } 38 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/my_getncpus.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2006, 2010, Oracle and/or its affiliates 3 | 4 | This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; version 2 of the License. 7 | 8 | This program is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | 13 | You should have received a copy of the GNU General Public License 14 | along with this program; if not, write to the Free Software 15 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 16 | 17 | /* get the number of (online) CPUs */ 18 | 19 | #include "mysys_priv.h" 20 | #ifdef HAVE_UNISTD_H 21 | #include 22 | #endif 23 | 24 | static int ncpus=0; 25 | 26 | int my_getncpus() 27 | { 28 | if (!ncpus) 29 | { 30 | #ifdef _SC_NPROCESSORS_ONLN 31 | ncpus= sysconf(_SC_NPROCESSORS_ONLN); 32 | #elif defined(__WIN__) 33 | SYSTEM_INFO sysinfo; 34 | 35 | /* 36 | * We are not calling GetNativeSystemInfo here because (1) we 37 | * don't believe that they return different values for number 38 | * of processors and (2) if WOW64 limits processors for Win32 39 | * then we don't want to try to override that. 40 | */ 41 | GetSystemInfo(&sysinfo); 42 | 43 | ncpus= sysinfo.dwNumberOfProcessors; 44 | #else 45 | /* unknown so play safe: assume SMP and forbid uniprocessor build */ 46 | ncpus= 2; 47 | #endif 48 | } 49 | return ncpus; 50 | } 51 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/my_getpagesize.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000-2003 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | #include "mysys_priv.h" 17 | 18 | #ifndef HAVE_GETPAGESIZE 19 | 20 | #if defined __WIN__ 21 | 22 | int my_getpagesize(void) 23 | { 24 | SYSTEM_INFO si; 25 | GetSystemInfo(&si); 26 | return si.dwPageSize; 27 | } 28 | 29 | #else 30 | 31 | /* Default implementation */ 32 | int my_getpagesize(void) 33 | { 34 | return (int)8192; 35 | } 36 | 37 | #endif 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/my_mess.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include "mysys_priv.h" 17 | 18 | void my_message_stderr(uint error __attribute__((unused)), 19 | const char *str, myf MyFlags) 20 | { 21 | DBUG_ENTER("my_message_stderr"); 22 | DBUG_PRINT("enter",("message: %s",str)); 23 | (void) fflush(stdout); 24 | if (MyFlags & ME_BELL) 25 | (void) fputc('\007', stderr); 26 | if (my_progname) 27 | { 28 | (void)fputs(my_progname,stderr); (void)fputs(": ",stderr); 29 | } 30 | (void)fputs(str,stderr); 31 | (void)fputc('\n',stderr); 32 | (void)fflush(stderr); 33 | DBUG_VOID_RETURN; 34 | } 35 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/my_mkdir.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | #include "mysys_priv.h" 17 | #include "mysys_err.h" 18 | #include 19 | #include 20 | #ifdef __WIN__ 21 | #include 22 | #endif 23 | 24 | int my_mkdir(const char *dir, int Flags, myf MyFlags) 25 | { 26 | DBUG_ENTER("my_dir"); 27 | DBUG_PRINT("enter",("dir: %s",dir)); 28 | 29 | #if defined(__WIN__) 30 | if (mkdir((char*) dir)) 31 | #else 32 | if (mkdir((char*) dir, Flags & my_umask_dir)) 33 | #endif 34 | { 35 | my_errno=errno; 36 | DBUG_PRINT("error",("error %d when creating direcory %s",my_errno,dir)); 37 | if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) 38 | my_error(EE_CANT_MKDIR, MYF(ME_BELL+ME_WAITTANG), dir, my_errno); 39 | DBUG_RETURN(-1); 40 | } 41 | DBUG_RETURN(0); 42 | } 43 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/my_rnd.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2007 MySQL AB & Michael Widenius 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | #include "mysys_priv.h" 17 | #include 18 | 19 | /* 20 | Initialize random generator 21 | 22 | NOTES 23 | MySQL's password checks depends on this, so don't do any changes 24 | that changes the random numbers that are generated! 25 | */ 26 | 27 | void my_rnd_init(struct my_rnd_struct *rand_st, ulong seed1, ulong seed2) 28 | { 29 | #ifdef HAVE_valgrind 30 | bzero((char*) rand_st,sizeof(*rand_st)); /* Avoid UMC varnings */ 31 | #endif 32 | rand_st->max_value= 0x3FFFFFFFL; 33 | rand_st->max_value_dbl=(double) rand_st->max_value; 34 | rand_st->seed1=seed1%rand_st->max_value ; 35 | rand_st->seed2=seed2%rand_st->max_value; 36 | } 37 | 38 | 39 | /* 40 | Generate random number. 41 | 42 | SYNOPSIS 43 | my_rnd() 44 | rand_st INOUT Structure used for number generation 45 | 46 | RETURN VALUE 47 | generated pseudo random number 48 | */ 49 | 50 | double my_rnd(struct my_rnd_struct *rand_st) 51 | { 52 | rand_st->seed1=(rand_st->seed1*3+rand_st->seed2) % rand_st->max_value; 53 | rand_st->seed2=(rand_st->seed1+rand_st->seed2+33) % rand_st->max_value; 54 | return (((double) rand_st->seed1)/rand_st->max_value_dbl); 55 | } 56 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/my_sleep.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | /* Wait a given number of microseconds */ 17 | 18 | #include "mysys_priv.h" 19 | #include 20 | 21 | void my_sleep(ulong m_seconds) 22 | { 23 | #if defined(__WIN__) 24 | Sleep(m_seconds/1000+1); /* Sleep() has millisecond arg */ 25 | #elif defined(HAVE_SELECT) 26 | struct timeval t; 27 | t.tv_sec= m_seconds / 1000000L; 28 | t.tv_usec= m_seconds % 1000000L; 29 | select(0,0,0,0,&t); /* sleep */ 30 | #else 31 | uint sec= (uint) ((m_seconds + 999999L) / 1000000L); 32 | ulong start= (ulong) time((time_t*) 0); 33 | while ((ulong) time((time_t*) 0) < start+sec); 34 | #endif 35 | } 36 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/mysys/my_static.h: -------------------------------------------------------------------------------- 1 | #ifndef MYSYS_MY_STATIC_INCLUDED 2 | #define MYSYS_MY_STATIC_INCLUDED 3 | 4 | /* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; version 2 of the License. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 18 | 19 | /* 20 | Static variables for mysys library. All definied here for easy making of 21 | a shared library 22 | */ 23 | 24 | C_MODE_START 25 | #include 26 | 27 | #define MAX_SIGNALS 10 /* Max signals under a dont-allow */ 28 | 29 | struct st_remember { 30 | int number; 31 | sig_handler (*func)(int number); 32 | }; 33 | 34 | extern char curr_dir[FN_REFLEN], home_dir_buff[FN_REFLEN]; 35 | 36 | extern volatile int _my_signals; 37 | extern struct st_remember _my_sig_remember[MAX_SIGNALS]; 38 | 39 | extern const char *soundex_map; 40 | 41 | extern USED_MEM* my_once_root_block; 42 | extern uint my_once_extra; 43 | 44 | extern struct st_my_file_info my_file_info_default[MY_NFILE]; 45 | 46 | C_MODE_END 47 | 48 | #endif /* MYSYS_MY_STATIC_INCLUDED */ 49 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/sql/share/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006 MySQL AB, 2009, 2010 Sun Microsystems, Inc. 2 | # Use is subject to license terms. 3 | # 4 | # This program is free software; you can redistribute it and/or modify 5 | # it under the terms of the GNU General Public License as published by 6 | # the Free Software Foundation; version 2 of the License. 7 | # 8 | # This program is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | # GNU General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU General Public License 14 | # along with this program; if not, write to the Free Software 15 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 | 17 | SET (dirs 18 | danish 19 | german 20 | slovak 21 | dutch 22 | greek 23 | norwegian 24 | spanish 25 | english 26 | hungarian 27 | norwegian-ny 28 | swedish 29 | italian 30 | polish 31 | ukrainian 32 | japanese 33 | portuguese 34 | romanian 35 | estonian 36 | korean 37 | russian 38 | czech 39 | french 40 | serbian 41 | ) 42 | 43 | SET(files 44 | errmsg-utf8.txt 45 | ) 46 | 47 | FOREACH (dir ${dirs}) 48 | INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dir} 49 | DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server) 50 | ENDFOREACH() 51 | INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/charsets DESTINATION ${INSTALL_MYSQLSHAREDIR} 52 | COMPONENT Common PATTERN "languages.html" EXCLUDE 53 | ) 54 | 55 | INSTALL(FILES ${files} DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server) 56 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/sql/sql_builtin.cc.in: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 15 | 16 | #include 17 | #include 18 | 19 | typedef struct st_maria_plugin builtin_maria_plugin[]; 20 | 21 | #ifdef _MSC_VER 22 | extern "C" 23 | #else 24 | extern 25 | #endif 26 | builtin_maria_plugin 27 | @mysql_mandatory_plugins@ @mysql_optional_plugins@ 28 | builtin_maria_binlog_plugin, builtin_maria_mysql_password_plugin; 29 | 30 | struct st_maria_plugin *mysql_optional_plugins[]= 31 | { 32 | @mysql_optional_plugins@ 0 33 | }; 34 | 35 | struct st_maria_plugin *mysql_mandatory_plugins[]= 36 | { 37 | builtin_maria_binlog_plugin, builtin_maria_mysql_password_plugin, 38 | @mysql_mandatory_plugins@ 0 39 | }; 40 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/strings/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006, 2010, Oracle and/or its affiliates 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) 17 | 18 | SET(STRINGS_SOURCES bchange.c bmove_upp.c ctype-big5.c ctype-bin.c ctype-cp932.c 19 | ctype-czech.c ctype-euc_kr.c ctype-eucjpms.c ctype-extra.c ctype-gb2312.c ctype-gbk.c 20 | ctype-latin1.c ctype-mb.c ctype-simple.c ctype-sjis.c ctype-tis620.c ctype-uca.c 21 | ctype-ucs2.c ctype-ujis.c ctype-utf8.c ctype-win1250ch.c ctype.c decimal.c dtoa.c int2str.c 22 | is_prefix.c llstr.c longlong2str.c my_strtoll10.c my_vsnprintf.c 23 | str2int.c str_alloc.c strcend.c strend.c strfill.c strmake.c strmov.c strnmov.c 24 | strxmov.c strxnmov.c xml.c 25 | strmov_overlapp.c 26 | my_strchr.c strcont.c strappend.c) 27 | 28 | IF(NOT HAVE_STRNLEN) 29 | # OSX does not have strnlen 30 | SET(STRINGS_SOURCES ${STRINGS_SOURCES} strnlen.c) 31 | ENDIF() 32 | # Avoid dependencies on perschema data defined in mysys 33 | ADD_DEFINITIONS(-DDISABLE_MYSQL_THREAD_H) 34 | ADD_CONVENIENCE_LIBRARY(strings ${STRINGS_SOURCES}) 35 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/strings/bmove_upp.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000 TXT DataKonsult Ab & Monty Program Ab 2 | Copyright (c) 2009-2011, Monty Program Ab 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OR 19 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 22 | USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 25 | OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | SUCH DAMAGE. 27 | */ 28 | 29 | /* File : bmove.c 30 | Author : Michael widenius 31 | Updated: 1987-03-20 32 | Defines: bmove_upp() 33 | 34 | bmove_upp(dst, src, len) moves exactly "len" bytes from the source 35 | "src-len" to the destination "dst-len" counting downwards. 36 | */ 37 | 38 | #include "strings_def.h" 39 | 40 | void bmove_upp(register uchar *dst, register const uchar *src, 41 | register size_t len) 42 | { 43 | while (len-- != 0) *--dst = *--src; 44 | } 45 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/strings/ctype-czech.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/packages/mariadb/deps/libmariadbclient/strings/ctype-czech.c -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/strings/ctype-latin1.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/monkey/duda/c162b5761836f7bd9e333b36658d1b949fad63ed/packages/mariadb/deps/libmariadbclient/strings/ctype-latin1.c -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/strings/is_prefix.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000 TXT DataKonsult Ab & Monty Program Ab 2 | Copyright (c) 2009-2011, Monty Program Ab 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OR 19 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 22 | USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 25 | OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | SUCH DAMAGE. 27 | */ 28 | 29 | /* File : is_prefix.c 30 | Author : Michael Widenius 31 | Defines: is_prefix() 32 | 33 | is_prefix(s, t) returns 1 if s starts with t. 34 | A empty t is allways a prefix. 35 | */ 36 | 37 | #include "strings_def.h" 38 | 39 | int is_prefix(register const char *s, register const char *t) 40 | { 41 | while (*t) 42 | if (*s++ != *t++) return 0; 43 | return 1; /* WRONG */ 44 | } 45 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/strings/str_alloc.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2005, 2006 MySQL AB 2 | Copyright (c) 2009-2011, Monty Program Ab 3 | Use is subject to license terms. 4 | Copyright (c) 2009-2011, Monty Program Ab 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; version 2 of the License. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 18 | 19 | #include "strings_def.h" 20 | 21 | static void *my_str_malloc_default(size_t size) 22 | { 23 | void *ret= malloc(size); 24 | if (!ret) 25 | exit(1); 26 | return ret; 27 | } 28 | 29 | static void my_str_free_default(void *ptr) 30 | { 31 | free(ptr); 32 | } 33 | 34 | void *(*my_str_malloc)(size_t)= &my_str_malloc_default; 35 | void (*my_str_free)(void *)= &my_str_free_default; 36 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/strings/strfill.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2000 TXT DataKonsult Ab & Monty Program Ab 2 | Copyright (c) 2009-2011, Monty Program Ab 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OR 19 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 22 | USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 25 | OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 | SUCH DAMAGE. 27 | */ 28 | 29 | /* File : strfill.c 30 | Author : Monty 31 | Updated: 1987.04.16 32 | Defines: strfill() 33 | 34 | strfill(dest, len, fill) makes a string of fill-characters. The result 35 | string is of length == len. The des+len character is allways set to NULL. 36 | strfill() returns pointer to dest+len; 37 | */ 38 | 39 | #include "strings_def.h" 40 | 41 | char * strfill(char *s, size_t len, pchar fill) 42 | { 43 | while (len--) *s++ = fill; 44 | *(s) = '\0'; 45 | return(s); 46 | } /* strfill */ 47 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/strings/strmov_overlapp.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2000 MySQL AB 2 | 3 | This program is free software; you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation; version 2 of the License. 6 | 7 | This program is distributed in the hope that it will be useful, 8 | but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | GNU General Public License for more details. 11 | 12 | You should have received a copy of the GNU General Public License 13 | along with this program; if not, write to the Free Software 14 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 15 | 16 | #include "strings_def.h" 17 | 18 | /* A trivial implementation */ 19 | char *strmov_overlapp(char *dst, const char *src) 20 | { 21 | size_t len= strlen(src); 22 | memmove(dst, src, len+1); 23 | return dst+len; 24 | } 25 | 26 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/vio/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include 17 | ${SSL_INCLUDE_DIRS}) 18 | ADD_DEFINITIONS(${SSL_DEFINES}) 19 | 20 | SET(VIO_SOURCES vio.c viosocket.c viossl.c viosslfactories.c) 21 | ADD_CONVENIENCE_LIBRARY(vio ${VIO_SOURCES}) 22 | TARGET_LINK_LIBRARIES(vio ${LIBSOCKET}) 23 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/zlib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. 2 | # 3 | # This program is free software; you can redistribute it and/or modify 4 | # it under the terms of the GNU General Public License as published by 5 | # the Free Software Foundation; version 2 of the License. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 | 16 | INCLUDE_DIRECTORIES( 17 | ${CMAKE_SOURCE_DIR}/include 18 | ${CMAKE_SOURCE_DIR}/zlib 19 | ) 20 | SET(ZLIB_SOURCES adler32.c compress.c crc32.c crc32.h deflate.c deflate.h gzio.c infback.c inffast.c inffast.h 21 | inffixed.h inflate.c inflate.h inftrees.c inftrees.h trees.c trees.h uncompr.c zconf.h zlib.h 22 | zutil.c zutil.h) 23 | ADD_CONVENIENCE_LIBRARY(zlib ${ZLIB_SOURCES}) 24 | RESTRICT_SYMBOL_EXPORTS(zlib) 25 | 26 | -------------------------------------------------------------------------------- /packages/mariadb/deps/libmariadbclient/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /packages/mariadb/dthread.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2014, Zeying Xie 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef MARIADB_DTHREAD_H 21 | #define MARIADB_DTHREAD_H 22 | 23 | #include "connection.h" 24 | 25 | typedef struct mariadb_result mariadb_result_t; 26 | 27 | int mariadb_dthread_connect(mariadb_conn_t *conn); 28 | mariadb_result_t *mariadb_dthread_query(mariadb_conn_t *conn, const char *query_str); 29 | char **mariadb_dthread_get_row(mariadb_conn_t *conn, mariadb_result_t *result, int *error); 30 | void mariadb_dthread_disconnect(mariadb_conn_t *conn); 31 | char **mariadb_dthread_get_fields(mariadb_result_t *result); 32 | int mariadb_dthread_get_field_num(mariadb_result_t *result); 33 | 34 | int mariadb_dthread_on_read(int fd, void *data); 35 | int mariadb_dthread_on_write(int fd, void *data); 36 | int mariadb_dthread_on_error(int fd, void *data); 37 | int mariadb_dthread_on_close(int fd, void *data); 38 | int mariadb_dthread_on_timeout(int fd, void *data); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /packages/mariadb/index.doc: -------------------------------------------------------------------------------- 1 | duda_package.c 2 | query_priv.h 3 | connection.c 4 | mariadb.c 5 | async.c 6 | pool.c 7 | dthread.c 8 | -------------------------------------------------------------------------------- /packages/mariadb/query.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2013, Zeying Xie 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef MARIADB_QUERY_H 23 | #define MARIADB_QUERY_H 24 | 25 | typedef struct mariadb_query mariadb_query_t; 26 | 27 | typedef void (mariadb_query_result_cb)(void *privdata, mariadb_query_t *query, 28 | unsigned long n_fields, char **fields, 29 | duda_request_t *dr); 30 | 31 | typedef void (mariadb_query_row_cb)(void *privdata, unsigned long n_fields, 32 | char **fields, char **values, duda_request_t *dr); 33 | 34 | typedef void (mariadb_query_end_cb)(void *privdata, mariadb_query_t *query, 35 | duda_request_t *dr); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /packages/redis/Makefile.in: -------------------------------------------------------------------------------- 1 | _PATH = $(patsubst $(monkey_root)/%, %, $(CURDIR)) 2 | CC = @echo " CC $(_PATH)/$@"; $CC 3 | CC_QUIET= @echo -n; $CC 4 | CFLAGS = $CFLAGS 5 | LDFLAGS = $LDFLAGS 6 | DEFS = $DEFS 7 | INCDIR = ../../../../src/include -I../../src 8 | OBJECTS = duda_package.o redis.o async.o dict.o hiredis.o net.o sds.o 9 | SOURCES = duda_package.c redis.c async.c dict.c hiredis.c net.c sds.c 10 | 11 | all: ../redis.dpkg 12 | 13 | -include $(OBJECTS:.o=.d) 14 | 15 | ../redis.dpkg: $(OBJECTS) 16 | $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -shared -o $@ $^ -lc 17 | 18 | .c.o: $(SOURCES) 19 | $(CC) $(CFLAGS) $(DEFS) -I$(INCDIR) -fPIC -c $< 20 | $(CC_QUIET) -MM -MP $(CFLAGS) $(DEFS) -I$(INCDIR) $*.c -o $*.d > /dev/null &2>&1 21 | 22 | clean: 23 | rm -rf *~ *.o 24 | -------------------------------------------------------------------------------- /packages/redis/fmacros.h: -------------------------------------------------------------------------------- 1 | #ifndef __HIREDIS_FMACRO_H 2 | #define __HIREDIS_FMACRO_H 3 | 4 | #if !defined(_BSD_SOURCE) 5 | #define _BSD_SOURCE 6 | #endif 7 | 8 | #if defined(__sun__) 9 | #define _POSIX_C_SOURCE 200112L 10 | #elif defined(__linux__) 11 | #define _XOPEN_SOURCE 600 12 | #else 13 | #define _XOPEN_SOURCE 14 | #endif 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /packages/sha1/Makefile.in: -------------------------------------------------------------------------------- 1 | _PATH = $(patsubst $(monkey_root)/%, %, $(CURDIR)) 2 | CC = @echo " CC $(_PATH)/$@"; $CC 3 | CC_QUIET= @echo -n; $CC 4 | CFLAGS = $CFLAGS 5 | LDFLAGS = $LDFLAGS 6 | DEFS = $DEFS 7 | INCDIR = ../../../../include/ -I../../src 8 | OBJECTS = duda_package.o sha1.o 9 | SOURCES = duda_package.c sha1.c 10 | 11 | all: ../sha1.dpkg 12 | 13 | -include $(OBJECTS:.o=.d) 14 | 15 | ../sha1.dpkg: $(OBJECTS) 16 | $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -shared -o $@ $^ -lc 17 | 18 | .c.o: $(SOURCES) 19 | $(CC) $(CFLAGS) $(DEFS) -I$(INCDIR) -fPIC -c $< 20 | $(CC_QUIET) -MM -MP $(CFLAGS) $(DEFS) -I$(INCDIR) $*.c -o $*.d > /dev/null &2>&1 21 | 22 | clean: 23 | rm -rf *~ *.o 24 | -------------------------------------------------------------------------------- /packages/sha1/index.doc: -------------------------------------------------------------------------------- 1 | duda_package.c -------------------------------------------------------------------------------- /packages/sha1/sha1.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2014, Eduardo Silva P. . 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #ifndef DUDA_PACKAGE_SHA1_H 21 | #define DUDA_PACKAGE_SHA1_H 22 | #include 23 | 24 | #define SHA_DIGEST_LENGTH 20 25 | 26 | struct duda_api_sha1 { 27 | void (*encode) (const void *, unsigned char *, unsigned long); 28 | }; 29 | 30 | typedef struct duda_api_sha1 sha1_object_t; 31 | sha1_object_t *sha1; 32 | 33 | typedef struct { 34 | unsigned long long size; 35 | unsigned int H[5]; 36 | unsigned int W[16]; 37 | } blk_SHA_CTX; 38 | 39 | void blk_SHA1_Init(blk_SHA_CTX *ctx); 40 | void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *dataIn, unsigned long len); 41 | void blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx); 42 | 43 | #define SHA_CTX blk_SHA_CTX 44 | #define SHA1_Init blk_SHA1_Init 45 | #define SHA1_Update blk_SHA1_Update 46 | #define SHA1_Final blk_SHA1_Final 47 | 48 | #endif // DUDA_PACKAGE_SHA1_H 49 | -------------------------------------------------------------------------------- /packages/sha256/Makefile.in: -------------------------------------------------------------------------------- 1 | _PATH = $(patsubst $(monkey_root)/%, %, $(CURDIR)) 2 | CC = @echo " CC $(_PATH)/$@"; $CC 3 | CC_QUIET= @echo -n; $CC 4 | CFLAGS = $CFLAGS 5 | LDFLAGS = $LDFLAGS 6 | DEFS = $DEFS 7 | INCDIR = ../../../../include/ -I../../src 8 | OBJECTS = duda_package.o sha256.o 9 | SOURCES = duda_package.c sha256.c 10 | 11 | all: ../sha256.dpkg 12 | 13 | -include $(OBJECTS:.o=.d) 14 | 15 | ../sha256.dpkg: $(OBJECTS) 16 | $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -shared -o $@ $^ -lc 17 | 18 | .c.o: $(SOURCES) 19 | $(CC) $(CFLAGS) $(DEFS) -I$(INCDIR) -fPIC -c $< 20 | $(CC_QUIET) -MM -MP $(CFLAGS) $(DEFS) -I$(INCDIR) $*.c -o $*.d > /dev/null &2>&1 21 | 22 | clean: 23 | rm -rf *~ *.o *.d 24 | -------------------------------------------------------------------------------- /packages/sha256/index.doc: -------------------------------------------------------------------------------- 1 | duda_package.c -------------------------------------------------------------------------------- /packages/sha256/sha256.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2001-2012, Eduardo Silva P. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef DUDA_PACKAGE_SHA256_H 23 | #define DUDA_PACKAGE_SHA256_H 24 | 25 | struct duda_api_sha256 { 26 | void (*encode) (unsigned char *, unsigned char *, int); 27 | }; 28 | 29 | typedef struct duda_api_sha256 sha256_object_t; 30 | sha256_object_t *sha256; 31 | 32 | #ifndef uint8 33 | #define uint8 unsigned char 34 | #endif 35 | 36 | #ifndef uint32 37 | #define uint32 unsigned long int 38 | #endif 39 | 40 | typedef struct 41 | { 42 | uint32 total[2]; 43 | uint32 state[8]; 44 | uint8 buffer[64]; 45 | } 46 | sha256_context; 47 | 48 | void sha256_starts(sha256_context *ctx); 49 | void sha256_update(sha256_context *ctx, uint8 *input, uint32 length); 50 | void sha256_finish(sha256_context *ctx, uint8 digest[32]); 51 | 52 | #endif 53 | 54 | 55 | -------------------------------------------------------------------------------- /packages/sqlite/Makefile.in: -------------------------------------------------------------------------------- 1 | _PATH = $(patsubst $(monkey_root)/%, %, $(CURDIR)) 2 | CC = @echo " CC $(_PATH)/$@"; $CC 3 | CC_QUIET= @echo -n; $CC 4 | CFLAGS = $CFLAGS 5 | LDFLAGS = $LDFLAGS 6 | DEFS = $DEFS 7 | INCDIR = ../../../../include/ -I../../src 8 | OBJECTS = duda_package.o sqlite.o 9 | 10 | all: ../sqlite.dpkg 11 | 12 | -include $(OBJECTS:.o=.d) 13 | 14 | ../sqlite.dpkg: $(OBJECTS) 15 | $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -shared -o $@ $^ -lc -lsqlite3 16 | 17 | .c.o: 18 | $(CC) $(CFLAGS) $(DEFS) -I$(INCDIR) -fPIC -c $< 19 | $(CC_QUIET) -MM -MP $(CFLAGS) $(DEFS) -I$(INCDIR) $*.c -o $*.d > /dev/null &2>&1 20 | 21 | clean: 22 | rm -rf *~ *.o 23 | -------------------------------------------------------------------------------- /packages/sqlite/index.doc: -------------------------------------------------------------------------------- 1 | duda_package.c 2 | sqlite.c 3 | sqlite.h 4 | -------------------------------------------------------------------------------- /packages/ssls/Makefile.in: -------------------------------------------------------------------------------- 1 | _PATH = $(patsubst $(monkey_root)/%, %, $(CURDIR)) 2 | CC = @echo " CC $(_PATH)/$@"; $CC 3 | CC_QUIET= @echo -n; $CC 4 | CFLAGS = $CFLAGS 5 | LDFLAGS = $LDFLAGS 6 | DEFS = $DEFS 7 | LIBS = -lpolarssl 8 | INCDIR = ../../../../src/include -I../../src 9 | OBJECTS = duda_package.o ssl_server.o 10 | SOURCES = duda_package.c ssl_server.c 11 | 12 | all: ../ssls.dpkg 13 | 14 | -include $(OBJECTS:.o=.d) 15 | 16 | ../ssls.dpkg: $(OBJECTS) 17 | $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -shared -o $@ $^ -lc $(LIBS) 18 | 19 | .c.o: $(SOURCES) 20 | $(CC) $(CFLAGS) $(DEFS) -I$(INCDIR) -fPIC -c $< 21 | $(CC_QUIET) -MM -MP $(CFLAGS) $(DEFS) -I$(INCDIR) $*.c -o $*.d > /dev/null &2>&1 22 | 23 | clean: 24 | rm -rf *~ *.o 25 | -------------------------------------------------------------------------------- /packages/websocket/ABOUT: -------------------------------------------------------------------------------- 1 | WebSockets Plugin 2 | ================= 3 | This is the Monkey WebSockets plugin 4 | 5 | -------------------------------------------------------------------------------- /packages/websocket/Makefile.in: -------------------------------------------------------------------------------- 1 | _PATH = $(patsubst $(monkey_root)/%, %, $(CURDIR)) 2 | CC = @echo " CC $(_PATH)/$@"; $CC 3 | CC_QUIET= @echo -n; $CC 4 | CFLAGS = $CFLAGS 5 | LDFLAGS = $LDFLAGS 6 | DEFS = $DEFS 7 | INCDIR = ../../../../include/ -I../../src 8 | OBJECTS = duda_package.o base64.o sha1.o websocket.o request.o broadcast.o callbacks.o 9 | SOURCES = duda_package.c base64.c sha1.c websocket.c request.c broadcast.c callbacks.c 10 | 11 | all: ../websocket.dpkg 12 | 13 | -include $(OBJECTS:.o=.d) 14 | 15 | ../websocket.dpkg: $(OBJECTS) 16 | $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -shared -o $@ $^ -lc -lm 17 | 18 | .c.o: 19 | $(CC) $(CFLAGS) $(DEFS) -I$(INCDIR) -fPIC -c $< 20 | $(CC_QUIET) -MM -MP $(CFLAGS) $(DEFS) -I$(INCDIR) $*.c -o $*.d > /dev/null &2>&1 21 | 22 | clean: 23 | rm -rf *~ *.o *.d 24 | -------------------------------------------------------------------------------- /packages/websocket/README: -------------------------------------------------------------------------------- 1 | WebSocket Duda Package 2 | ====================== 3 | This package adds the WebSocket protocol support into 4 | Duda, the code is based in RFC6455: 5 | 6 | http://tools.ietf.org/html/rfc6455 7 | 8 | Author 9 | ====== 10 | Written by Eduardo Silva 11 | 12 | -------------------------------------------------------------------------------- /packages/websocket/base64.h: -------------------------------------------------------------------------------- 1 | unsigned char * base64_encode(const unsigned char *src, size_t len, 2 | size_t *out_len); 3 | unsigned char *base64_decode(const unsigned char *src, size_t len, 4 | size_t *out_len); 5 | -------------------------------------------------------------------------------- /packages/websocket/callbacks.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | 3 | /* Duda I/O 4 | * -------- 5 | * Copyright (C) 2012-2014, Eduardo Silva P. . 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | */ 19 | 20 | #include "duda_api.h" 21 | #include "request.h" 22 | 23 | #ifndef WEBSOCKET_CALLBACKS_H 24 | #define WEBSOCKET_CALLBACKS_H 25 | 26 | /* Event callback codes */ 27 | #define WS_ON_OPEN 0x0 28 | #define WS_ON_MESSAGE 0x1 29 | #define WS_ON_ERROR 0x2 30 | #define WS_ON_CLOSE 0x3 31 | #define WS_ON_TIMEOUT 0x4 32 | 33 | /* Struct to set the callbacks from duda_main() */ 34 | struct ws_callbacks_t { 35 | void (*on_open) (duda_request_t *, ws_request_t *); 36 | void (*on_message)(duda_request_t *, ws_request_t *); 37 | void (*on_error) (duda_request_t *, ws_request_t *); 38 | void (*on_close) (duda_request_t *, ws_request_t *); 39 | void (*on_timeout)(duda_request_t *, ws_request_t *); 40 | }; 41 | 42 | int ws_set_callback(int type, void (*callback) (duda_request_t *, struct ws_request *)); 43 | struct ws_callbacks_t *ws_callbacks; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /packages/websocket/index.doc: -------------------------------------------------------------------------------- 1 | websocket.c 2 | callbacks.c 3 | broadcast.c -------------------------------------------------------------------------------- /packages/websocket/sha1.h: -------------------------------------------------------------------------------- 1 | /* 2 | * SHA1 routine optimized to do word accesses rather than byte accesses, 3 | * and to avoid unnecessary copies into the context array. 4 | * 5 | * This was initially based on the Mozilla SHA1 implementation, although 6 | * none of the original Mozilla code remains. 7 | */ 8 | 9 | typedef struct { 10 | unsigned long long size; 11 | unsigned int H[5]; 12 | unsigned int W[16]; 13 | } blk_SHA_CTX; 14 | 15 | void blk_SHA1_Init(blk_SHA_CTX *ctx); 16 | void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *dataIn, unsigned long len); 17 | void blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx); 18 | 19 | #define SHA_CTX blk_SHA_CTX 20 | #define SHA1_Init blk_SHA1_Init 21 | #define SHA1_Update blk_SHA1_Update 22 | #define SHA1_Final blk_SHA1_Final 23 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(src 2 | duda.c) 3 | 4 | add_definitions(-DDUDA_LIB_CORE) 5 | add_executable(duda ${src}) 6 | target_link_libraries(duda duda-static) 7 | -------------------------------------------------------------------------------- /src/Makefile.in: -------------------------------------------------------------------------------- 1 | _PATH = $(patsubst $(monkey_root)/%, %, $(CURDIR)) 2 | CC = @echo " CC $(_PATH)/$@"; $CC 3 | CC_QUIET= @echo -n; $CC 4 | CFLAGS = $CFLAGS 5 | LDFLAGS = $LDFLAGS 6 | DEFS = $DEFS 7 | INCDIR = ../../../include/ 8 | 9 | OBJECTS = duda.o duda_gc.o duda_mem.o duda_conf.o duda_api.o duda_event.o \ 10 | duda_body_buffer.o duda_sendfile.o duda_debug.o duda_global.o \ 11 | duda_package.o duda_param.o duda_session.o duda_cookie.o \ 12 | duda_request.o duda_response.o duda_queue.o duda_console.o duda_log.o \ 13 | duda_qs.o duda_worker.o duda_stats.o duda_fconf.o duda_data.o \ 14 | duda_xtime.o duda_utils.o duda_dthread.o duda_router.o \ 15 | duda_dthread_channel.o 16 | 17 | all: ../monkey-duda.so 18 | 19 | -include $(OBJECTS:.o=.d) 20 | 21 | ../monkey-duda.so: $(OBJECTS) 22 | @(for d in $(DIRS); do $(MAKE) -C $$d ; done) 23 | $(CC) $(CFLAGS) $(LDFLAGS) $(DEFS) -shared -o $@ $^ -lc 24 | 25 | .c.o: 26 | $(CC) $(CFLAGS) $(DEFS) -I$(INCDIR) -fPIC -c $< 27 | $(CC_QUIET) -MM -MP $(CFLAGS) $(DEFS) -I$(INCDIR) $*.c -o $*.d > /dev/null &2>&1 28 | 29 | clean: 30 | @(for d in $(DIRS); do $(MAKE) -C $$d clean; done) 31 | rm -rf *.o *~ *.*so* *.d 32 | --------------------------------------------------------------------------------