├── requirements.txt ├── bin └── .gitignore ├── .gitmodules ├── src ├── ceph_ver.h └── acconfig.h ├── docs ├── Unused files ├── Rados Changes └── Not used .CC files ├── .gitignore ├── vagrant-provision.yml ├── Vagrantfile ├── README.md ├── bootstrap.py ├── Makefile └── LICENSE.txt /requirements.txt: -------------------------------------------------------------------------------- 1 | wget==2.2 2 | -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | ceph.conf 2 | *.log 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ceph"] 2 | path = ceph 3 | url=https://github.com/AcalephStorage/ceph.git -------------------------------------------------------------------------------- /src/ceph_ver.h: -------------------------------------------------------------------------------- 1 | #ifndef CEPH_VERSION_H 2 | #define CEPH_VERSION_H 3 | 4 | #define CEPH_GIT_VER 00a3ac3b67d93860e7f0b6e07319f11b14d0fec0 5 | #define CEPH_GIT_NICE_VER "0.92" 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /docs/Unused files: -------------------------------------------------------------------------------- 1 | CephxServiceHandler.cc - NU 2 | AuthNoneAuthorizeHandler.cc - NU 3 | Client.h -NU 4 | Client.cc - NU 5 | fuse_ll.cc - NU 6 | ObjecterWriteback.h - NU 7 | escape.c - NU 8 | escape.h - NU 9 | fd.cc - NU 10 | fd.h - NU 11 | util.cc - NU 12 | global-init.cc - NU 13 | libcephfs.h - NU 14 | mdstypes.h - NU 15 | net_handler.cc - NU 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.ko 4 | *.obj 5 | *.elf 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Libraries 12 | *.lib 13 | *.a 14 | *.la 15 | *.lo 16 | 17 | # Shared objects (inc. Windows DLLs) 18 | *.dll 19 | *.so 20 | *.so.* 21 | *.dylib 22 | 23 | # Executables 24 | *.exe 25 | *.out 26 | *.app 27 | *.i*86 28 | *.x86_64 29 | *.hex 30 | /nbproject/ 31 | *.keyring 32 | -------------------------------------------------------------------------------- /vagrant-provision.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | tasks: 4 | - apt: pkg=linux-image-extra-{{ ansible_kernel }} state=present update_cache=yes cache_valid_time=3600 5 | sudo: yes 6 | - name: Install required packages 7 | apt: pkg={{item}} 8 | with_items: 9 | - build-essential 10 | - autotools-dev 11 | - autoconf 12 | - automake 13 | - cdbs 14 | - gcc 15 | - g++ 16 | - git 17 | - libboost-dev 18 | - libedit-dev 19 | - libssl-dev 20 | - libtool 21 | - libfcgi 22 | - libfcgi-dev 23 | - libfuse-dev 24 | - linux-kernel-headers 25 | - libcrypto++-dev 26 | - libexpat1-dev 27 | - pkg-config 28 | - libcurl4-gnutls-dev 29 | - uuid-dev 30 | - libkeyutils-dev 31 | - libgoogle-perftools-dev 32 | - libatomic-ops-dev 33 | - libaio-dev 34 | - libgdata-common 35 | - libgdata13 36 | - libsnappy-dev 37 | - libleveldb-dev 38 | - libblkid-dev 39 | - xfslibs-dev 40 | - libboost-thread-dev 41 | - libboost-program-options-dev 42 | - libudev-dev 43 | - libcrypto++-doc 44 | - libcrypto++-utils 45 | sudo: yes 46 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # All Vagrant configuration is done below. The "2" in Vagrant.configure 5 | # configures the configuration version (we support older styles for 6 | # backwards compatibility). Please don't change it unless you know what 7 | # you're doing. 8 | Vagrant.configure(2) do |config| 9 | 10 | # Every Vagrant virtual environment requires a box to build off of. 11 | config.vm.box = 'ubuntu/trusty64' 12 | 13 | VM_IP = 41 14 | VM_NAME = "rados#{VM_IP}" 15 | 16 | config.vm.hostname = VM_NAME 17 | 18 | # Create a private network, which allows host-only access to the machine 19 | # using a specific IP. 20 | config.vm.network 'private_network', ip: "192.168.73.#{VM_IP}" 21 | 22 | # # Mount the "vagrant" folder at "/vagrant" with all permission bits open 23 | # config.vm.synced_folder '.', '/vagrant', owner: 'vagrant', group: 'vagrant', mount_options: ['dmode=777,fmode=777'] 24 | 25 | config.vm.provider 'virtualbox' do |vbox| 26 | vbox.name = VM_NAME 27 | vbox.memory = 2048 28 | vbox.cpus = 2 29 | end 30 | 31 | config.vm.provision 'ansible' do |ansible| 32 | ansible.playbook = 'vagrant-provision.yml' 33 | end 34 | 35 | # No custom/secure keys to avoid the vagrant username/password prompt 36 | config.ssh.insert_key = false 37 | 38 | # If true, then any SSH connections made will enable agent forwarding. 39 | # Default value: false 40 | config.ssh.forward_agent = true 41 | 42 | end 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rados_dll 2 | Windows port of Ceph librados. 3 | 4 | #### Pre-requisites 5 | * python 2.7.10 - [https://www.python.org/downloads/windows/](https://www.python.org/downloads/windows/) 6 | * mingw - [http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download](http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download) 7 | * pthreads 2.9.1 - [http://sourceforge.net/projects/pthreads4w/files/latest/download](http://sourceforge.net/projects/pthreads4w/files/latest/download) 8 | * boost 1.57.0 - [http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.zip/download](http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.zip/download) 9 | * glib-2.0 - [http://win32builder.gnome.org/packages/3.6/glib-dev_2.34.3-1_win32.zip](http://win32builder.gnome.org/packages/3.6/glib-dev_2.34.3-1_win32.zip) 10 | 11 | #### Preparation 12 | 13 | Install required packages 14 | 15 | ``` 16 | C:\rados_dll>C:\Python27\Scripts\pip.exe install -r requirements.txt 17 | ``` 18 | 19 | Run the `bootstrap.py` script 20 | 21 | ``` 22 | C:\rados_dll>python bootstrap.py 23 | ``` 24 | 25 | Run it again after checking/modifying your PATH 26 | 27 | ``` 28 | C:\rados_dll>python bootstrap.py 29 | ``` 30 | 31 | Install Microsoft Visual Studio 2013 32 | 33 | #### Build NSS 34 | 35 | ``` 36 | C:\mozilla-build\start-shell-msvc2013.bat 37 | 38 | $ cd Downloads/nss-3.18/nss 39 | 40 | ~/Downloads/nss-3.18/nss 41 | $ make nss_build_all 42 | ``` 43 | 44 | 45 | 46 | 47 | #### Building 48 | 49 | ``` 50 | $ 51 | $ make 52 | ``` 53 | 54 | #### Testing 55 | 56 | Copy or create `ceph.conf` under `bin` folder, then: 57 | 58 | ``` 59 | $ cd bin 60 | $ rados_client.exe 61 | ``` 62 | 63 | Tested against Ceph v0.92 64 | -------------------------------------------------------------------------------- /docs/Rados Changes: -------------------------------------------------------------------------------- 1 | Rados Changes 2 | 3 | 4 | AuthMethodList.h 5 | Crypto.cc 6 | Trace.h 7 | cls_lock_client.cc 8 | cls_lock_types.h 9 | addr_parsing.c 10 | admin_socket.cc 11 | admin_socket.h 12 | admin_socket_client.cc 13 | armor.c 14 | assert.cc 15 | BackTrace.h 16 | buffer.cc 17 | ceph_context.cc 18 | ceph_context.h 19 | ceph_crypto.cc 20 | ceph_crypto.h 21 | cmdparse.h 22 | Cond.h 23 | config_opts.h 24 | crc32c.cc 25 | debug.h 26 | dout.h 27 | errno.cc 28 | errno.h 29 | Formatter.cc 30 | Formatter.h 31 | hobject.cc 32 | hobject.h 33 | lockdep.cc 34 | LogClient.cc 35 | LogEntry.cc 36 | map_cacher.hpp 37 | Mutex.cc 38 | Mutex.h 39 | page.cc 40 | perf_counters.cc 41 | perf_counters.h 42 | safe_io.c 43 | safe_io.h 44 | sctp_crc32.c 45 | secret.c 46 | signal.cc 47 | signal.h 48 | simple_spin.cc 49 | str_map.cc 50 | Thread.cc 51 | Thread.h 52 | TrackedOp.h 53 | builder.c 54 | crush.c 55 | crush.h 56 | CrushCompiler.cc 57 | CrushWrapper.cc 58 | CrushWrapper.h 59 | grammar.h 60 | hash.c 61 | mapper.c 62 | signal_handler.cc 63 | signal_handler.h 64 | librados.h 65 | librados.hpp 66 | features.h 67 | librbd.h 68 | librbd.hpp 69 | assert.h 70 | atomic.h 71 | buffer.h 72 | byteorder.h 73 | context.h 74 | encoding.h 75 | io_priority.cc 76 | int_types.h 77 | msgr.h 78 | rados.h 79 | rbd_types.h 80 | stat.h 81 | statlite.h 82 | types.h 83 | unordered_map.h 84 | utime.h 85 | uuid.h 86 | xlist.h 87 | librados.cc 88 | RadosClient.cc 89 | RadosXattrIter.h 90 | Entry.h 91 | Log.cc 92 | Log.h 93 | test.cc 94 | MCommand.h 95 | MForward.h 96 | MGetPoolStats.h 97 | MGetPoolStatsReply.h 98 | MLog.h 99 | MlogAck.h 100 | MMDSBeacon.h 101 | MMDSMap.h 102 | MPing.h 103 | MRoute.h 104 | MStatfs.h 105 | MonClient.cc 106 | MonMap.cc 107 | AsyncConnection.cc 108 | AsyncConnection.h 109 | AsyncMessenger.cc 110 | AsyncMessenger.h 111 | Event.cc 112 | Event.h 113 | EventPoll.cc 114 | Accepter.cc 115 | Pipe.cc 116 | Pipe.h 117 | SimpleMessenger.h 118 | Message.cc 119 | Message.h 120 | Messenger.cc 121 | Messenger.h 122 | msg_types.cc 123 | ObjectMap.h 124 | ObjectStore.h 125 | HitSet.h 126 | OpRequest.cc 127 | OpRequest.h 128 | osd_types.cc 129 | osd_types.h 130 | OSDMap.cc 131 | OSDMAp.h 132 | Objecter.cc 133 | Objecter.h 134 | libcephfs.cc 135 | 136 | 137 | 138 | Rados Only (Addons) 139 | ceph-mingw-type.h 140 | guid.h 141 | uuid.cc -------------------------------------------------------------------------------- /docs/Not used .CC files: -------------------------------------------------------------------------------- 1 | Not used .CC files 2 | 3 | auth/cephx 4 | CephxAuthorizeHandler.cc 5 | CephxKeyServer.cc 6 | CephxServiceHandler.cc 7 | 8 | auth/none 9 | AuthNoneAuthorizeHandler.cc 10 | 11 | auth/unknown 12 | AuthUnknownAuthorizeHandler.cc 13 | 14 | 15 | auth/ 16 | AuthAuthorizeHandler.cc 17 | AuthServiceHandler.cc 18 | 19 | 20 | client/ 21 | barrier.cc 22 | Client.cc 23 | ClientSnapRealm.cc 24 | Dentry.cc 25 | fuse_ll.cc 26 | Inode.cc 27 | Makefile.am 28 | MetaRequest.cc 29 | MetaSession.cc 30 | 31 | cls/hello 32 | cls_hello.cc 33 | 34 | 35 | cls/lock 36 | cls_lock.cc 37 | cls_lock_ops.cc 38 | cls_lock_types.cc 39 | 40 | cls/log 41 | cls_log.cc 42 | cls_log_client.cc 43 | 44 | cls/rbd 45 | cls_rbd.cc 46 | cls_rbd_client.cc 47 | 48 | cls/refcount 49 | cls_refcount.cc 50 | cls_refcount_client.cc 51 | cls_refcount_ops.cc 52 | 53 | cls/replica_log 54 | cls_replica_log.cc 55 | cls_replica_log_client.cc 56 | cls_replica_log_ops.cc 57 | cls_replica_log_types.cc 58 | 59 | cls/rgw 60 | cls_rgw.cc 61 | cls_rgw_client.cc 62 | cls_rgw_ops.cc 63 | cls_rgw_types.cc 64 | 65 | cls/statelog 66 | cls_statelog.cc 67 | cls_statelog_client.cc 68 | cls_statelog_ops.cc 69 | cls_statelog_types.cc 70 | 71 | cls/user 72 | cls_user.cc 73 | cls_user_client.cc 74 | cls_user_ops.cc 75 | cls_user_types.cc 76 | 77 | cls/version 78 | cls_version.cc 79 | cls_version_client.cc 80 | cls_version_ops.cc 81 | cls_version_types.cc 82 | 83 | cls/ 84 | CMakeLists 85 | Makefile.am 86 | 87 | common/ 88 | address_helper.cc 89 | blkdev.cc 90 | ceph_crypto_cms.cc 91 | ceph_json.cc 92 | ContextCompletion.cc 93 | crc32c_intel_baseline.cc 94 | crc32c_intel_fast.cc 95 | crc32c_intel_fast_asm.S 96 | crc32c_intel_fast_zero_asm.S 97 | Cycles.cc 98 | dummy.cc 99 | fd.cc 100 | HeartbeatMap 101 | ipaddr.cc 102 | linux_version.cc 103 | Makefile.am 104 | MemoryModel.cc 105 | mime.cc 106 | module.cc 107 | obj_bencher.cc 108 | OutputDataSocket.cc 109 | pick_address.cc 110 | Readahead.cc 111 | run_cmd.cc 112 | secret.cc 113 | SloppyCRCMap.cc 114 | TextTable.cc 115 | TrackedOp.cc 116 | WorkQueue.cc 117 | 118 | 119 | crush/ 120 | CrushCompiler.cc 121 | CrushTester.cc 122 | 123 | 124 | global/ 125 | global_init.cc 126 | Makefile.am 127 | pidfile.cc 128 | signal_handler.cc 129 | 130 | include/ 131 | cephfs folder 132 | 133 | json_spirit/ 134 | json_spirit_value.cpp 135 | Makefile.am 136 | CMakeLists 137 | 138 | Key_value_store/ 139 | cls_kvs.cc 140 | kv_flat_btree_async 141 | Makefile.am 142 | 143 | Librados\ 144 | Makefile.am 145 | 146 | log\ 147 | test.cc 148 | Makefile.am 149 | 150 | 151 | mds\ 152 | Beacon.cc 153 | Capability.cc 154 | CDentry.cc 155 | CDir.cc 156 | CInode.cc 157 | flock.cc 158 | InoTable.cc 159 | journal.cc 160 | JournalPointer.cc 161 | Locker.cc 162 | locks.cc 163 | LogEvent.cc 164 | Makefile.am 165 | MDBalancer.cc 166 | MDCache.cc 167 | MDLog.cc 168 | MDS 169 | MDSAuthCaps.cc 170 | MDSContext.cc 171 | MDSTable.cc 172 | MDSTableClient.cc 173 | MDSTableServer.cc 174 | Migrator.cc 175 | Mutation.cc 176 | RecoveryQueue.cc 177 | Server.cc 178 | SessionMap.cc 179 | snap.cc 180 | SnapRealm.cc 181 | SnapServer.cc 182 | 183 | messages\ 184 | Makefile.am 185 | 186 | 187 | mon\ 188 | AuthMonitor.cc 189 | ConfigKeyService.cc 190 | DataHealthService.cc 191 | Elector.cc 192 | HealtMonitor.cc 193 | LogMonitor.cc 194 | Makefile.am 195 | MDSMonitor.cc 196 | Monitor.cc 197 | MonitorStore.cc 198 | MonMap.cc 199 | MonmapMonitor.cc 200 | OSDMonitor.cc 201 | PGMap.cc 202 | PGMonitor.cc 203 | 204 | msg\async 205 | whole folder 206 | 207 | msg\xio 208 | whole folder 209 | 210 | msg\ 211 | Makefile.am 212 | 213 | osd\ 214 | Ager.cc 215 | ClassHandler.cc 216 | ECBackend.cc 217 | ECMsgTypes.cc 218 | ECTransaction.cc 219 | ECUtil.cc 220 | OpRequest.cc 221 | OSD.cc 222 | OSDCap.cc 223 | PG.cc 224 | PGBackend.cc 225 | PGLog.cc 226 | ReplicatedBackend.cc 227 | ReplicatedPG.cc 228 | SnapMapper.cc 229 | Watch.cc 230 | -------------------------------------------------------------------------------- /bootstrap.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # rados_dll environment setup Python script 4 | # 5 | # Copyright (c) 2015 by Acaleph Pty. 6 | 7 | import os 8 | import platform 9 | import subprocess 10 | import sys 11 | import wget 12 | 13 | from os import path 14 | 15 | CWD = os.getcwd() 16 | 17 | # Bail if we're not running under Windows 18 | if not (os.name == "nt" and platform.system() == "Windows"): 19 | print "This script was meant to run under Windows." 20 | sys.exit(1) 21 | 22 | from _winreg import * 23 | 24 | DOWNLOADS_DIR = path.join(path.expanduser("~"), "Downloads") 25 | 26 | def check_or_download(url, filename = None, basedir = DOWNLOADS_DIR): 27 | if not path.isdir(basedir): 28 | os.makedirs(basedir) 29 | os.chdir(basedir) 30 | target = path.join(basedir, filename if filename is not None else url.rsplit('/', 1)[1]) 31 | print "Checking {}".format(target) 32 | if path.isfile(target): 33 | return target 34 | print "Downloading {}".format(target) 35 | return wget.download(url, target) 36 | 37 | MINGW_DIR = path.join("C:\\", "MinGw") 38 | 39 | PATH_TO_MINGW_BIN = path.join(MINGW_DIR, "bin") 40 | PATH_TO_MINGW_GET = path.join(PATH_TO_MINGW_BIN, "mingw-get.exe") 41 | 42 | PATH_TO_MINGW_GET_SETUP = path.join(DOWNLOADS_DIR, "mingw-get-setup.exe") 43 | MINGW_GET_SETUP_URL = "http://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download" 44 | 45 | MINGW_GET_URL = "http://downloads.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" 46 | 47 | NSS_VER = "3.19.1" 48 | NSS_VER_UNDERSCORE = NSS_VER.replace('.', '_') 49 | PATH_TO_NSS = path.join(DOWNLOADS_DIR, "nss-" + NSS_VER) 50 | 51 | def install_mingw_setup(): 52 | if not path.isfile(PATH_TO_MINGW_GET_SETUP): 53 | check_or_download(MINGW_GET_SETUP_URL, filename="mingw-get-setup.exe") 54 | print 55 | subprocess.call(PATH_TO_MINGW_GET_SETUP, shell=True) 56 | 57 | def install_mingw(): 58 | if not path.isfile(PATH_TO_MINGW_GET): 59 | print "\"{}\" not found. Will attempt to download and install".format(PATH_TO_MINGW_GET) 60 | install_mingw_setup() 61 | subprocess.call([PATH_TO_MINGW_GET, "install", "base", "gcc", "g++", "msys-make", "pthreads-w32"]) 62 | 63 | def get_user_path(aReg): 64 | aKey = OpenKey(aReg, r"Environment") 65 | try: 66 | for i in range(1024): 67 | try: 68 | n, v, t = EnumValue(aKey, i) 69 | if n == "Path": 70 | return v 71 | except WindowsError: 72 | break 73 | finally: 74 | CloseKey(aKey) 75 | 76 | def set_user_path(aReg, new_user_path): 77 | aKey = OpenKey(aReg, "Environment", 0, KEY_WRITE) 78 | try: 79 | SetValueEx(aKey,"Path",0, REG_SZ, new_user_path) 80 | print "Please close this terminal and rerun \"python bootstrap.py\"" 81 | except EnvironmentError: 82 | print "Encountered problems writing into the Registry..." 83 | finally: 84 | CloseKey(aKey) 85 | 86 | def add_to_user_path(path): 87 | print "\"{}\" not in path! Will attempt to set registry.".format(path) 88 | aReg = ConnectRegistry(None,HKEY_CURRENT_USER) 89 | try: 90 | current_user_path = get_user_path(aReg) 91 | print "current_user_path: ", current_user_path 92 | if current_user_path is None or path not in current_user_path.split(';'): 93 | new_user_path = path if current_user_path is None else current_user_path + ";" + path 94 | print r"*** Writing new %PATH% registry entry to user environment ***" 95 | set_user_path(aReg, new_user_path) 96 | else: 97 | print "\"{}\" already in registry. Please close this terminal and rerun \"python bootstrap.py\"".format(PATH_TO_MINGW_BIN) 98 | finally: 99 | CloseKey(aReg) 100 | 101 | def ensure_all_in_path(paths): 102 | current_env_path = os.environ["PATH"].split(';') 103 | if all(path in current_env_path for path in paths): 104 | return True 105 | for path in paths: 106 | if not path in current_env_path: 107 | add_to_user_path(path) 108 | return False 109 | 110 | PATH_TO_MSYS_BIN = path.join(MINGW_DIR, "msys", "1.0", "bin") 111 | 112 | def modify_user_path(): 113 | if not ensure_all_in_path([PATH_TO_MINGW_BIN, PATH_TO_MSYS_BIN, path.join(PATH_TO_NSS, "dist", "WIN954.0_DBG.OBJ", "lib")]): 114 | sys.exit(1) 115 | 116 | PATH_TO_7Z = path.join("C:\\", "Program Files", "7-Zip", "7z.exe") 117 | SEVEN_ZIP_URL = "http://www.7-zip.org/a/7z1505-x64.exe" 118 | 119 | def install_7za(): 120 | if not path.isfile(PATH_TO_7Z): 121 | print "\n\"{}\" not found. Will attempt to download and install".format(PATH_TO_7Z) 122 | seven_zip_filename = check_or_download(SEVEN_ZIP_URL) 123 | subprocess.call(seven_zip_filename, shell=True) 124 | 125 | BOOST_VER = "1.58.0" 126 | BOOST_VER_UNDERSCORE = BOOST_VER.replace('.', '_') 127 | BOOST_DIR = path.join(DOWNLOADS_DIR, "boost_" + BOOST_VER_UNDERSCORE) 128 | BOOST_URL = "http://sourceforge.net/projects/boost/files/boost/" + BOOST_VER + "/boost_" + BOOST_VER_UNDERSCORE + ".zip/download" 129 | 130 | def install_and_compile_boost(): 131 | if not path.isfile(path.join(BOOST_DIR, "bootstrap.bat")): 132 | print "\n Will download and compile boost libraries." 133 | boost_zip_filename = check_or_download(BOOST_URL, filename="boost_" + BOOST_VER_UNDERSCORE + ".zip") 134 | subprocess.call([PATH_TO_7Z, "x", "-y", boost_zip_filename]) 135 | os.chdir(BOOST_DIR) 136 | if not path.isdir(path.join(BOOST_DIR, "bin.v2")): 137 | if not path.isfile(path.join(BOOST_DIR, "b2.exe")): 138 | subprocess.call([path.join(BOOST_DIR, "bootstrap.bat"), "mingw"]) 139 | subprocess.call([path.join(BOOST_DIR, "b2.exe"), "toolset=gcc", "variant=release"]) 140 | 141 | PATH_TO_GLIB = path.join(DOWNLOADS_DIR, "glib-dev_2.34.3-1_win32") 142 | GLIB_URL = "http://win32builder.gnome.org/packages/3.6/glib-dev_2.34.3-1_win32.zip" 143 | 144 | def download_and_extract_glib(): 145 | if not path.isdir(path.join(PATH_TO_GLIB)): 146 | glib_zip_filename = check_or_download(GLIB_URL) 147 | print "Extracting glib" 148 | os.makedirs(PATH_TO_GLIB) 149 | os.chdir(PATH_TO_GLIB) 150 | subprocess.call([PATH_TO_7Z, "x", "-y", glib_zip_filename]) 151 | 152 | MOZILLA_BUILD_URL = "http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe" 153 | PATH_TO_MOZILLA_BUILD = path.join(DOWNLOADS_DIR, "") 154 | 155 | def install_mozilla_build(): 156 | if not (path.isdir("C:\\mozilla-build") and path.isfile("C:\\mozilla-build\\start-shell-msvc2013.bat")): 157 | print "Downloading and installing Mozilla build" 158 | mozilla_build_filename = check_or_download(MOZILLA_BUILD_URL) 159 | subprocess.call(mozilla_build_filename, shell=True) 160 | 161 | NSS_URL = "https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_" + NSS_VER_UNDERSCORE + "_RTM/src/nss-" + NSS_VER + "-with-nspr-4.10.8.tar.gz" 162 | 163 | def download_nss(): 164 | if not path.isdir(PATH_TO_NSS): 165 | print 166 | nss_filename = check_or_download(NSS_URL) 167 | print 168 | print "Extracting {}".format(NSS_URL.rsplit('/',1)[1]) 169 | subprocess.call([PATH_TO_7Z, "x", "-y", nss_filename, "-so", "|", PATH_TO_7Z, "x", "-aoa", "-si","-ttar"], shell=True) 170 | 171 | def main(args): 172 | # Make sure the ~/Downloads directory exists, and chdir to that 173 | if not path.isdir(DOWNLOADS_DIR): 174 | os.makedirs(DOWNLOADS_DIR) 175 | os.chdir(DOWNLOADS_DIR) 176 | 177 | install_mingw() 178 | 179 | modify_user_path() 180 | 181 | install_7za() 182 | install_and_compile_boost() 183 | 184 | download_and_extract_glib() 185 | 186 | install_mozilla_build() 187 | download_nss() 188 | 189 | if __name__ == "__main__": 190 | sys.exit(main(sys.argv)) -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | SRC = src 2 | CEPH_SRC = ceph/src 3 | BUILD = build 4 | BIN = bin 5 | 6 | CC = gcc 7 | CPP = g++ 8 | 9 | PTHREAD=pthreadgce2 10 | BOOST_VER=1_58 11 | 12 | # Change the following directories according to your environment 13 | HOME=$(USERPROFILE) 14 | INCLUDE_BASE=$(HOME)/Downloads 15 | BOOST_BASE_PATH=$(INCLUDE_BASE)/boost_$(BOOST_VER)_0 16 | PTHREADS_BASE_PATH=$(INCLUDE_BASE)/pthreads-win32/prebuilt-dll-2-9-1-release 17 | NSS_BASE_PATH=$(INCLUDE_BASE)/nss-3.19.1/dist 18 | GLIB_BASE_PATH=$(INCLUDE_BASE)/glib-dev_2.34.3-1_win32 19 | 20 | CEPH_INCLUDE = -I$(SRC) -I$(CEPH_SRC) -I$(NSS_BASE_PATH)/public/nss -I$(NSS_BASE_PATH)/WIN954.0_DBG.OBJ/include -I$(BOOST_BASE_PATH) -I$(PTHREADS_BASE_PATH)/include -l$(PTHREAD) 21 | CFLAGS = $(CEPH_INCLUDE) -lws2_32 -D__USE_FILE_OFFSET64 -DHAVE_CONFIG_H -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -D_GNU_SOURCE -fno-strict-aliasing -fsigned-char -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -g -DPIC 22 | CPPFLAGS = $(CFLAGS) -Wno-invalid-offsetof 23 | CLIBS = -L$(PTHREADS_BASE_PATH)/dll/x86 -L$(BOOST_BASE_PATH)/stage/lib -L$(NSS_BASE_PATH)/WIN954.0_DBG.OBJ/lib -L$(GLIB_BASE_PATH)/lib 24 | 25 | all: $(BIN)/rados_client.exe 26 | 27 | $(BUILD)/rados_client.o:$(CEPH_SRC)/rados_client.c 28 | $(CC) -c $(CFLAGS) $^ -o $@ 29 | $(BUILD)/%.o:$(CEPH_SRC)/%.c 30 | $(CC) -c $(CFLAGS) $^ -o $@ 31 | $(BUILD)/%.o:$(CEPH_SRC)/%.cc 32 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 33 | $(BUILD)/%.o:$(CEPH_SRC)/auth/%.cc 34 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 35 | $(BUILD)/%.o:$(CEPH_SRC)/auth/cephx/%.cc 36 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 37 | $(BUILD)/%.o:$(CEPH_SRC)/mon/%.cc 38 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 39 | $(BUILD)/%.o:$(CEPH_SRC)/cls/%.cc 40 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 41 | $(BUILD)/%.o:$(CEPH_SRC)/include/%.cc 42 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 43 | $(BUILD)/%.o:$(CEPH_SRC)/common/%.cc 44 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 45 | $(BUILD)/%.o:$(CEPH_SRC)/common/%.c 46 | $(CC) -c $(CFLAGS) $^ -o $@ 47 | $(BUILD)/%.o:$(CEPH_SRC)/librados/%.cc 48 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 49 | $(BUILD)/%.o:$(CEPH_SRC)/log/%.cc 50 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 51 | $(BUILD)/%.o:$(CEPH_SRC)/osdc/%.cc 52 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 53 | $(BUILD)/%.o:$(CEPH_SRC)/osd/%.cc 54 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 55 | $(BUILD)/%.o:$(CEPH_SRC)/msg/%.cc 56 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 57 | $(BUILD)/%.o:$(CEPH_SRC)/%.cc 58 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 59 | $(BUILD)/%.o:$(CEPH_SRC)/cls/%.cc 60 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 61 | $(BUILD)/%.o:$(CEPH_SRC)/mds/%.cc 62 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 63 | $(BUILD)/%.o:$(CEPH_SRC)/mon/%.cc 64 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 65 | $(BUILD)/%.o:$(CEPH_SRC)/global/%.cc 66 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 67 | $(BUILD)/%.o:$(CEPH_SRC)/crush/%.cc 68 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 69 | $(BUILD)/%.o:$(CEPH_SRC)/crush/%.c 70 | $(CC) -c $(CFLAGS) $^ -o $@ 71 | $(BUILD)/%.o:$(CEPH_SRC)/cls/lock/%.cc 72 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 73 | $(BUILD)/%.o:$(CEPH_SRC)/mds/%.cc 74 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 75 | $(BUILD)/%.o:$(CEPH_SRC)/msg/simple/%.cc 76 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 77 | $(BUILD)/%.o:$(CEPH_SRC)/perfglue/%.cc 78 | $(CPP) -c $(CFLAGS) $^ -o $@ 79 | $(BUILD)/%.o:$(CEPH_SRC)/json_spirit/%.cpp 80 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 81 | $(BUILD)/%.o:$(CEPH_SRC)/erasure-code/%.cc 82 | $(CPP) -c $(CPPFLAGS) $^ -o $@ 83 | 84 | OBJECTS= ./$(BUILD)/hash.o ./$(BUILD)/snap_set_diff.o ./$(BUILD)/librados.o ./$(BUILD)/IoCtxImpl.o ./$(BUILD)/RadosClient.o ./$(BUILD)/RadosXattrIter.o \ 85 | ./$(BUILD)/Objecter.o ./$(BUILD)/MonClient.o ./$(BUILD)/CrushWrapper.o ./$(BUILD)/MonMap.o ./$(BUILD)/CephxAuthorizeHandler.o ./$(BUILD)/CephxKeyServer.o ./$(BUILD)/CephxServiceHandler.o \ 86 | ./$(BUILD)/mdstypes.o ./$(BUILD)/assert.o ./$(BUILD)/Pipe.o ./$(BUILD)/admin_socket.o ./$(BUILD)/Elector.o ./$(BUILD)/Paxos.o \ 87 | ./$(BUILD)/MDSMap.o ./$(BUILD)/ceph_argparse.o ./$(BUILD)/OSDMap.o ./$(BUILD)/admin_socket_client.o ./$(BUILD)/MonitorStore.o ./$(BUILD)/MonMapMonitor.o ./$(BUILD)/PaxosService.o \ 88 | ./$(BUILD)/entity_name.o ./$(BUILD)/ceph_context.o ./$(BUILD)/CephxClientHandler.o ./$(BUILD)/TextTable.o ./$(BUILD)/util.o \ 89 | ./$(BUILD)/Message.o ./$(BUILD)/common_init.o ./$(BUILD)/osd_types.o ./$(BUILD)/Messenger.o ./$(BUILD)/MDSMonitor.o ./$(BUILD)/OSDMonitor.o ./$(BUILD)/PGMonitor.o ./$(BUILD)/PGMap.o \ 90 | ./$(BUILD)/RotatingKeyRing.o ./$(BUILD)/CephxProtocol.o ./$(BUILD)/CephxSessionHandler.o ./$(BUILD)/global_context.o \ 91 | ./$(BUILD)/LogClient.o ./$(BUILD)/AuthMethodList.o ./$(BUILD)/ceph_strings.o ./$(BUILD)/AuthMonitor.o ./$(BUILD)/ErasureCode.o ./$(BUILD)/ErasureCodePlugin.o \ 92 | ./$(BUILD)/Formatter.o ./$(BUILD)/escape.o ./$(BUILD)/ceph_crypto.o ./$(BUILD)/builder.o ./$(BUILD)/ConfigKeyService.o \ 93 | ./$(BUILD)/Timer.o ./$(BUILD)/BackTrace.o ./$(BUILD)/hex.o ./$(BUILD)/crush.o ./$(BUILD)/AuthServiceHandler.o \ 94 | ./$(BUILD)/Finisher.o ./$(BUILD)/Throttle.o ./$(BUILD)/ceph_fs.o ./$(BUILD)/mapper.o ./$(BUILD)/LogMonitor.o ./$(BUILD)/HealthMonitor.o \ 95 | ./$(BUILD)/ceph_frag.o ./$(BUILD)/config.o ./$(BUILD)/MonCap.o ./$(BUILD)/Filer.o ./$(BUILD)/DataHealthService.o \ 96 | ./$(BUILD)/types.o ./$(BUILD)/Crypto.o ./$(BUILD)/str_map.o ./$(BUILD)/json_spirit_reader.o ./$(BUILD)/json_spirit_writer.o \ 97 | ./$(BUILD)/errno.o ./$(BUILD)/snap_types.o ./$(BUILD)/Striper.o ./$(BUILD)/Monitor.o \ 98 | ./$(BUILD)/buffer.o ./$(BUILD)/Mutex.o ./$(BUILD)/hash.o ./$(BUILD)/ObjectCacher.o ./$(BUILD)/CrushTester.o \ 99 | ./$(BUILD)/lockdep.o ./$(BUILD)/perf_counters.o ./$(BUILD)/Clock.o ./$(BUILD)/signal_handler.o \ 100 | ./$(BUILD)/armor.o ./$(BUILD)/AuthClientHandler.o ./$(BUILD)/LogEntry.o \ 101 | ./$(BUILD)/environment.o ./$(BUILD)/safe_io.o ./$(BUILD)/strtol.o \ 102 | ./$(BUILD)/simple_spin.o ./$(BUILD)/Clock.o ./$(BUILD)/Journaler.o \ 103 | ./$(BUILD)/page.o ./$(BUILD)/sctp_crc32.o ./$(BUILD)/crc32c.o ./$(BUILD)/cmdparse.o \ 104 | ./$(BUILD)/KeyRing.o ./$(BUILD)/RefCountedObj.o ./$(BUILD)/str_list.o \ 105 | ./$(BUILD)/Thread.o ./$(BUILD)/code_environment.o ./$(BUILD)/SimpleMessenger.o \ 106 | ./$(BUILD)/io_priority.o ./$(BUILD)/signal.o ./$(BUILD)/cls_lock_client.o \ 107 | ./$(BUILD)/ConfUtils.o ./$(BUILD)/utf8.o ./$(BUILD)/hobject.o \ 108 | ./$(BUILD)/bloom_filter.o ./$(BUILD)/DecayCounter.o ./$(BUILD)/inode_backtrace.o \ 109 | ./$(BUILD)/msg_types.o ./$(BUILD)/SubsystemMap.o ./$(BUILD)/uuid.o \ 110 | ./$(BUILD)/HitSet.o ./$(BUILD)/Log.o ./$(BUILD)/PrebufferedStreambuf.o ./$(BUILD)/version.o \ 111 | ./$(BUILD)/Accepter.o ./$(BUILD)/DispatchQueue.o ./$(BUILD)/PipeConnection.o ./$(BUILD)/dout.o \ 112 | ./$(BUILD)/AuthSessionHandler.o ./$(BUILD)/histogram.o ./$(BUILD)/ceph_hash.o ./$(BUILD)/addr_parsing.o ./$(BUILD)/cmdparse.o 113 | 114 | $(BIN)/rados.dll:$(OBJECTS) 115 | $(CPP) $(CFLAGS) $(CLIBS) -shared -o $@ $^ -lbws2_32 -lpthreadGCE2 -lgio-2.0 -lglib-2.0 -lgobject-2.0 -lnss3 -lnss -lnspr4 -lfreebl3 -lnssckbi -lnssutil3 -lplc4 -lssl3 \ 116 | -lboost_thread-mgw48-mt-$(BOOST_VER) -lboost_atomic-mgw48-mt-$(BOOST_VER) -lboost_log-mgw48-mt-$(BOOST_VER) -lboost_system-mgw48-mt-$(BOOST_VER) 117 | 118 | $(BIN)/rados_client.exe:$(BUILD)/rados_client.o $(BIN)/rados.dll 119 | $(CPP) $(CFLAGS) $(CLIBS) -o $@ $^ -unicode -lws2_32 -l$(PTHREAD) -lgio-2.0 -lglib-2.0 -lgobject-2.0 \ 120 | -lboost_thread-mgw48-mt-$(BOOST_VER) -lboost_atomic-mgw48-mt-$(BOOST_VER) -lboost_log-mgw48-mt-$(BOOST_VER) -lboost_system-mgw48-mt-$(BOOST_VER) 121 | 122 | clean: 123 | del $(OBJECTS) 124 | rm -f $(BUILD)\*.o 125 | del $(BIN)\rados.dll 126 | del $(BIN)\rados_client.exe 127 | -------------------------------------------------------------------------------- /src/acconfig.h: -------------------------------------------------------------------------------- 1 | /* src/acconfig.h. Generated from acconfig.h.in by configure. */ 2 | /* src/acconfig.h.in. Generated from configure.ac by autoheader. */ 3 | 4 | /* fallocate(2) is supported */ 5 | #define CEPH_HAVE_FALLOCATE /**/ 6 | 7 | /* F_SETPIPE_SZ is supported */ 8 | /* #undef CEPH_HAVE_SETPIPE_SZ */ 9 | 10 | /* splice(2) is supported */ 11 | //#define CEPH_HAVE_SPLICE /**/ 12 | 13 | /* Define if darwin/osx */ 14 | /* #undef DARWIN */ 15 | 16 | /* Define if you want C_Gather debugging */ 17 | #define DEBUG_GATHER 1 18 | 19 | /* Define if enabling coverage. */ 20 | /* #undef ENABLE_COVERAGE */ 21 | 22 | /* FastCGI headers are in /usr/include/fastcgi */ 23 | /* #undef FASTCGI_INCLUDE_DIR */ 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_ARPA_INET_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_ARPA_NAMESER_COMPAT_H 1 30 | 31 | /* have boost::random::discrete_distribution */ 32 | /* #undef HAVE_BOOST_RANDOM_DISCRETE_DISTRIBUTION */ 33 | 34 | /* Define if have curl_multi_wait() */ 35 | /* #undef HAVE_CURL_MULTI_WAIT */ 36 | 37 | /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you 38 | don't. */ 39 | #define HAVE_DECL_STRERROR_R 1 40 | 41 | /* Define to 1 if you have the header file, and it defines `DIR'. 42 | */ 43 | #define HAVE_DIRENT_H 1 44 | 45 | /* Define to 1 if you have the header file. */ 46 | #define HAVE_DLFCN_H 1 47 | 48 | /* Define to 1 if you have fdatasync. */ 49 | #define HAVE_FDATASYNC 1 50 | 51 | /* linux/fiemap.h was found, fiemap ioctl will be used */ 52 | #define HAVE_FIEMAP_H /**/ 53 | 54 | /* Define if the C complier supports __func__ */ 55 | #define HAVE_FUNC /**/ 56 | 57 | /* Define to 1 if you have the `fuse_getgroups' function. */ 58 | #define HAVE_FUSE_GETGROUPS 1 59 | 60 | /* we have a recent yasm and are x86_64 */ 61 | /* #undef HAVE_GOOD_YASM_ELF64 */ 62 | 63 | /* Define to 1 if the system has the type `int16_t'. */ 64 | #define HAVE_INT16_T 1 65 | 66 | /* Define to 1 if the system has the type `int32_t'. */ 67 | #define HAVE_INT32_T 1 68 | 69 | /* Define to 1 if the system has the type `int64_t'. */ 70 | #define HAVE_INT64_T 1 71 | 72 | /* Define to 1 if the system has the type `int8_t'. */ 73 | #define HAVE_INT8_T 1 74 | 75 | /* Define to 1 if you have the header file. */ 76 | #define HAVE_INTTYPES_H 1 77 | 78 | /* Defined if LevelDB supports bloom filters */ 79 | #define HAVE_LEVELDB_FILTER_POLICY 1 80 | 81 | /* Defined if you don't have atomic_ops */ 82 | #define HAVE_LIBAIO 1 83 | 84 | /* Define to 1 if you have the `boost_program_options' library 85 | (-lboost_program_options). */ 86 | /* #undef HAVE_LIBBOOST_PROGRAM_OPTIONS */ 87 | 88 | /* Define to 1 if you have the `boost_program_options-mt' library 89 | (-lboost_program_options-mt). */ 90 | #define HAVE_LIBBOOST_PROGRAM_OPTIONS_MT 1 91 | 92 | /* Define to 1 if you have the `boost_system' library (-lboost_system). */ 93 | /* #undef HAVE_LIBBOOST_SYSTEM */ 94 | 95 | /* Define to 1 if you have the `boost_system-mt' library (-lboost_system-mt). 96 | */ 97 | #define HAVE_LIBBOOST_SYSTEM_MT 1 98 | 99 | /* Define to 1 if you have the `boost_thread' library (-lboost_thread). */ 100 | /* #undef HAVE_LIBBOOST_THREAD */ 101 | 102 | /* Define to 1 if you have the `boost_thread-mt' library (-lboost_thread-mt). 103 | */ 104 | #define HAVE_LIBBOOST_THREAD_MT 1 105 | 106 | /* Define if you have fuse */ 107 | //#define HAVE_LIBFUSE 1 108 | 109 | /* Define to 1 if you have the `leveldb' library (-lleveldb). */ 110 | #define HAVE_LIBLEVELDB 1 111 | 112 | /* Define to 1 if you have the `profiler' library (-lprofiler). */ 113 | /* #undef HAVE_LIBPROFILER */ 114 | 115 | /* Define to 1 if you have the `snappy' library (-lsnappy). */ 116 | #define HAVE_LIBSNAPPY 1 117 | 118 | /* Define if you have tcmalloc */ 119 | #define HAVE_LIBTCMALLOC 1 120 | 121 | /* Define to 1 if you have libxfs */ 122 | #define HAVE_LIBXFS 1 123 | 124 | /* Defined if you have libzfs enabled */ 125 | /* #undef HAVE_LIBZFS */ 126 | 127 | /* Define to 1 if you have the header file. */ 128 | //#define HAVE_LINUX_TYPES_H 1 129 | 130 | /* Define to 1 if you have the header file. */ 131 | #define HAVE_LINUX_VERSION_H 1 132 | 133 | /* Define to 1 if you have the header file. */ 134 | #define HAVE_MEMORY_H 1 135 | 136 | /* Define to 1 if you have the header file, and it defines `DIR'. */ 137 | /* #undef HAVE_NDIR_H */ 138 | 139 | /* Define to 1 if you have the header file. */ 140 | #define HAVE_NETDB_H 1 141 | 142 | /* Define to 1 if you have the header file. */ 143 | #define HAVE_NETINET_IN_H 1 144 | 145 | /* Support (PCLMUL) Carry-Free Muliplication */ 146 | #define HAVE_PCLMUL /**/ 147 | 148 | /* Define to 1 if you have the `pipe2' function. */ 149 | #define HAVE_PIPE2 1 150 | 151 | /* Define to 1 if you have the `posix_fadvise' function. */ 152 | #define HAVE_POSIX_FADVISE 1 153 | 154 | /* Define to 1 if you have the `posix_fallocate' function. */ 155 | #define HAVE_POSIX_FALLOCATE 1 156 | 157 | /* Define to 1 if you have the `prctl' function. */ 158 | #define HAVE_PRCTL 1 159 | 160 | /* Define if the C complier supports __PRETTY_FUNCTION__ */ 161 | #define HAVE_PRETTY_FUNC /**/ 162 | 163 | /* Define if you have perftools profiler enabled */ 164 | /* #undef HAVE_PROFILER */ 165 | 166 | /* Define if you have POSIX threads libraries and header files. */ 167 | #define HAVE_PTHREAD 1 168 | 169 | /* Define if you have pthread_spin_init */ 170 | #define HAVE_PTHREAD_SPINLOCK 1 171 | 172 | /* Support SSE (Streaming SIMD Extensions) instructions */ 173 | #define HAVE_SSE /**/ 174 | 175 | /* Support SSE2 (Streaming SIMD Extensions 2) instructions */ 176 | #define HAVE_SSE2 /**/ 177 | 178 | /* Support SSE3 (Streaming SIMD Extensions 3) instructions */ 179 | #define HAVE_SSE3 /**/ 180 | 181 | /* Support SSE4.1 (Streaming SIMD Extensions 4.1) instructions */ 182 | #define HAVE_SSE4_1 /**/ 183 | 184 | /* Support SSE4.2 (Streaming SIMD Extensions 4.2) instructions */ 185 | #define HAVE_SSE4_2 /**/ 186 | 187 | /* Support SSSE3 (Supplemental Streaming SIMD Extensions 3) instructions */ 188 | #define HAVE_SSSE3 /**/ 189 | 190 | /* define if the compiler supports static_cast<> */ 191 | #define HAVE_STATIC_CAST /**/ 192 | 193 | /* Define if you have struct stat.st_mtimespec.tv_nsec */ 194 | /* #undef HAVE_STAT_ST_MTIMESPEC_TV_NSEC */ 195 | 196 | /* Define if you have struct stat.st_mtim.tv_nsec */ 197 | #define HAVE_STAT_ST_MTIM_TV_NSEC 1 198 | 199 | /* Define to 1 if you have the header file. */ 200 | #define HAVE_STDINT_H 1 201 | 202 | /* Define to 1 if you have the header file. */ 203 | #define HAVE_STDLIB_H 1 204 | 205 | /* Define to 1 if you have the `strerror_r' function. */ 206 | #define HAVE_STRERROR_R 1 207 | 208 | /* Define to 1 if you have the header file. */ 209 | #define HAVE_STRINGS_H 1 210 | 211 | /* Define to 1 if you have the header file. */ 212 | #define HAVE_STRING_H 1 213 | 214 | /* Define to 1 if you have the `syncfs' function. */ 215 | /* #undef HAVE_SYNCFS */ 216 | 217 | /* sync_file_range(2) is supported */ 218 | #define HAVE_SYNC_FILE_RANGE /**/ 219 | 220 | /* Define to 1 if you have the header file. */ 221 | #define HAVE_SYSLOG_H 1 222 | 223 | /* Define to 1 if you have the header file, and it defines `DIR'. 224 | */ 225 | /* #undef HAVE_SYS_DIR_H */ 226 | 227 | /* Define to 1 if you have the header file. */ 228 | #define HAVE_SYS_FILE_H 1 229 | 230 | /* Define to 1 if you have the header file. */ 231 | #define HAVE_SYS_IOCTL_H 1 232 | 233 | /* Define to 1 if you have the header file. */ 234 | #define HAVE_SYS_MOUNT_H 1 235 | 236 | /* Define to 1 if you have the header file, and it defines `DIR'. 237 | */ 238 | /* #undef HAVE_SYS_NDIR_H */ 239 | 240 | /* Define to 1 if you have the header file. */ 241 | #define HAVE_SYS_PARAM_H 1 242 | 243 | /* Define to 1 if you have the header file. */ 244 | //#define HAVE_SYS_PRCTL_H 1 245 | 246 | /* Define to 1 if you have the header file. */ 247 | #define HAVE_SYS_SOCKET_H 1 248 | 249 | /* Define to 1 if you have the header file. */ 250 | #define HAVE_SYS_STATVFS_H 1 251 | 252 | /* Define to 1 if you have the header file. */ 253 | #define HAVE_SYS_STAT_H 1 254 | 255 | /* we have syncfs */ 256 | /* #undef HAVE_SYS_SYNCFS */ 257 | 258 | /* Define to 1 if you have the header file. */ 259 | #define HAVE_SYS_TIME_H 1 260 | 261 | /* Define to 1 if you have the header file. */ 262 | #define HAVE_SYS_TYPES_H 1 263 | 264 | /* Define to 1 if you have the header file. */ 265 | #define HAVE_SYS_VFS_H 1 266 | 267 | /* Define to 1 if you have that is POSIX.1 compatible. */ 268 | #define HAVE_SYS_WAIT_H 1 269 | 270 | /* Define to 1 if you have the header file. */ 271 | #define HAVE_SYS_XATTR_H 1 272 | 273 | /* Define to 1 if the system has the type `uint16_t'. */ 274 | #define HAVE_UINT16_T 1 275 | 276 | /* Define to 1 if the system has the type `uint32_t'. */ 277 | #define HAVE_UINT32_T 1 278 | 279 | /* Define to 1 if the system has the type `uint64_t'. */ 280 | #define HAVE_UINT64_T 1 281 | 282 | /* Define to 1 if the system has the type `uint8_t'. */ 283 | #define HAVE_UINT8_T 1 284 | 285 | /* Define to 1 if you have the header file. */ 286 | #define HAVE_UNISTD_H 1 287 | 288 | /* Define to 1 if you have the header file. */ 289 | #define HAVE_UTIME_H 1 290 | 291 | /* Define to 1 if the system has the type `__be16'. */ 292 | #define HAVE___BE16 1 293 | 294 | /* Define to 1 if the system has the type `__be32'. */ 295 | #define HAVE___BE32 1 296 | 297 | /* Define to 1 if the system has the type `__be64'. */ 298 | #define HAVE___BE64 1 299 | 300 | /* Define to 1 if the system has the type `__le16'. */ 301 | #define HAVE___LE16 1 302 | 303 | /* Define to 1 if the system has the type `__le32'. */ 304 | #define HAVE___LE32 1 305 | 306 | /* Define to 1 if the system has the type `__le64'. */ 307 | #define HAVE___LE64 1 308 | 309 | /* Define to 1 if the system has the type `__s16'. */ 310 | #define HAVE___S16 1 311 | 312 | /* Define to 1 if the system has the type `__s32'. */ 313 | #define HAVE___S32 1 314 | 315 | /* Define to 1 if the system has the type `__s64'. */ 316 | #define HAVE___S64 1 317 | 318 | /* Define to 1 if the system has the type `__s8'. */ 319 | #define HAVE___S8 1 320 | 321 | /* Define to 1 if the system has the type `__u16'. */ 322 | #define HAVE___U16 1 323 | 324 | /* Define to 1 if the system has the type `__u32'. */ 325 | #define HAVE___U32 1 326 | 327 | /* Define to 1 if the system has the type `__u64'. */ 328 | #define HAVE___U64 1 329 | 330 | /* Define to 1 if the system has the type `__u8'. */ 331 | #define HAVE___U8 1 332 | 333 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 334 | */ 335 | #define LT_OBJDIR ".libs/" 336 | 337 | /* Defined if you do not have atomic_ops */ 338 | #define NO_ATOMIC_OPS 339 | 340 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 341 | /* #undef NO_MINUS_C_MINUS_O */ 342 | 343 | /* Name of package */ 344 | #define PACKAGE "ceph" 345 | 346 | /* Define to the address where bug reports for this package should be sent. */ 347 | #define PACKAGE_BUGREPORT "ceph-devel@vger.kernel.org" 348 | 349 | /* Define to the full name of this package. */ 350 | #define PACKAGE_NAME "ceph" 351 | 352 | /* Define to the full name and version of this package. */ 353 | #define PACKAGE_STRING "ceph 0.92" 354 | 355 | /* Define to the one symbol short name of this package. */ 356 | #define PACKAGE_TARNAME "ceph" 357 | 358 | /* Define to the version of this package. */ 359 | #define PACKAGE_VERSION "0.92" 360 | 361 | /* Defined if you want pg ref debugging */ 362 | /* #undef PG_DEBUG_REFS */ 363 | 364 | /* Define to necessary symbol if this constant uses a non-standard name on 365 | your system. */ 366 | /* #undef PTHREAD_CREATE_JOINABLE */ 367 | 368 | /* Define to 1 if you have the ANSI C header files. */ 369 | #define STDC_HEADERS 1 370 | 371 | /* Define to 1 if strerror_r returns char *. */ 372 | #define STRERROR_R_CHAR_P 1 373 | 374 | /* Define if using CryptoPP. */ 375 | //#define USE_CRYPTOPP 1 376 | 377 | /* Define if using NSS. */ 378 | #define USE_NSS 1 379 | 380 | /* Version number of package */ 381 | #define VERSION "0.92" 382 | 383 | /* define if radosgw enabled */ 384 | #define WITH_RADOSGW 1 385 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | [This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.] 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | How to Apply These Terms to Your New Libraries 461 | 462 | If you develop a new library, and you want it to be of the greatest 463 | possible use to the public, we recommend making it free software that 464 | everyone can redistribute and change. You can do so by permitting 465 | redistribution under these terms (or, alternatively, under the terms of the 466 | ordinary General Public License). 467 | 468 | To apply these terms, attach the following notices to the library. It is 469 | safest to attach them to the start of each source file to most effectively 470 | convey the exclusion of warranty; and each file should have at least the 471 | "copyright" line and a pointer to where the full notice is found. 472 | 473 | 474 | Copyright (C) 475 | 476 | This library is free software; you can redistribute it and/or 477 | modify it under the terms of the GNU Lesser General Public 478 | License as published by the Free Software Foundation; either 479 | version 2.1 of the License, or (at your option) any later version. 480 | 481 | This library is distributed in the hope that it will be useful, 482 | but WITHOUT ANY WARRANTY; without even the implied warranty of 483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 484 | Lesser General Public License for more details. 485 | 486 | You should have received a copy of the GNU Lesser General Public 487 | License along with this library; if not, write to the Free Software 488 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 489 | 490 | Also add information on how to contact you by electronic and paper mail. 491 | 492 | You should also get your employer (if you work as a programmer) or your 493 | school, if any, to sign a "copyright disclaimer" for the library, if 494 | necessary. Here is a sample; alter the names: 495 | 496 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 497 | library `Frob' (a library for tweaking knobs) written by James Random Hacker. 498 | 499 | , 1 April 1990 500 | Ty Coon, President of Vice 501 | 502 | That's all there is to it! 503 | --------------------------------------------------------------------------------