diff --git a/.compute b/.compute index 38d03dd06c..16977ac594 100755 --- a/.compute +++ b/.compute @@ -21,5 +21,4 @@ python3 -u DeepSpeech.py \ --display_step 0 \ --validation_step 1 \ --checkpoint_dir "../keep" \ - --summary_dir "../keep/summaries" \ - --decoder_library_path "../tmp/native_client/libctc_decoder_with_kenlm.so" + --summary_dir "../keep/summaries" diff --git a/.gitattributes b/.gitattributes index c4bdb1fed4..0bdd5738c8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,3 @@ *.binary filter=lfs diff=lfs merge=lfs -crlf data/lm/trie filter=lfs diff=lfs merge=lfs -crlf data/lm/vocab.txt filter=lfs diff=lfs merge=lfs -text -data/lm/trie.ctcdecode filter=lfs diff=lfs merge=lfs -text diff --git a/.install b/.install index d7801ca0da..f776c1e481 100755 --- a/.install +++ b/.install @@ -7,4 +7,10 @@ pip install tensorflow-gpu==1.12.0rc2 python3 util/taskcluster.py --arch gpu --target ../tmp/native_client +# Install ds_ctcdecoder package from TaskCluster +VERSION=$(python -c 'import pkg_resources; print(pkg_resources.safe_version(open("VERSION").read()))') +PYVER=$(python -c 'import sys; print("cp{0}{1}-cp{0}{1}m".format(sys.version_info.major, sys.version_info.minor))') +python3 util/taskcluster.py --arch cpu --target ../tmp --artifact "ds_ctcdecoder-${VERSION}-${PYVER}-manylinux1_x86_64.whl" +pip install ../tmp/ds_ctcdecoder-*.whl + mkdir -p ../keep/summaries diff --git a/DeepSpeech.py b/DeepSpeech.py index 83e0248547..006e1a69ad 100755 --- a/DeepSpeech.py +++ b/DeepSpeech.py @@ -8,356 +8,26 @@ log_level_index = sys.argv.index('--log_level') + 1 if '--log_level' in sys.argv else 0 os.environ['TF_CPP_MIN_LOG_LEVEL'] = sys.argv[log_level_index] if log_level_index > 0 and log_level_index < len(sys.argv) else '3' -import datetime -import pickle +import evaluate +import numpy as np +import progressbar import shutil -import six -import subprocess +import tempfile import tensorflow as tf -import time import traceback -import inspect -import progressbar -import tempfile -from functools import partial -from six.moves import zip, range, filter, urllib, BaseHTTPServer -from tensorflow.python.tools import freeze_graph +from ds_ctcdecoder import ctc_beam_search_decoder, Scorer +from six.moves import zip, range from tensorflow.contrib.lite.python import tflite_convert -from threading import Thread, Lock +from tensorflow.python.tools import freeze_graph from util.audio import audiofile_to_input_vector +from util.config import Config, initialize_globals +from util.coordinator import TrainingCoordinator from util.feeding import DataSet, ModelFeeder +from util.flags import create_flags, FLAGS +from util.logging import log_info, log_error, log_debug, log_warn from util.preprocess import preprocess -from util.gpu import get_available_gpus -from util.shared_lib import check_cupti -from util.text import sparse_tensor_value_to_texts, wer, levenshtein, Alphabet -from xdg import BaseDirectory as xdg -import numpy as np - - -def create_flags(): - # Importer - # ======== - - tf.app.flags.DEFINE_string ('train_files', '', 'comma separated list of files specifying the dataset used for training. multiple files will get merged') - tf.app.flags.DEFINE_string ('dev_files', '', 'comma separated list of files specifying the dataset used for validation. multiple files will get merged') - tf.app.flags.DEFINE_string ('test_files', '', 'comma separated list of files specifying the dataset used for testing. multiple files will get merged') - tf.app.flags.DEFINE_boolean ('fulltrace', False, 'if full trace debug info should be generated during training') - - tf.app.flags.DEFINE_string ('train_cached_features_path', '', 'comma separated list of files specifying the dataset used for training. multiple files will get merged') - tf.app.flags.DEFINE_string ('dev_cached_features_path', '', 'comma separated list of files specifying the dataset used for validation. multiple files will get merged') - tf.app.flags.DEFINE_string ('test_cached_features_path', '', 'comma separated list of files specifying the dataset used for testing. multiple files will get merged') - - # Cluster configuration - # ===================== - - tf.app.flags.DEFINE_string ('ps_hosts', '', 'parameter servers - comma separated list of hostname:port pairs') - tf.app.flags.DEFINE_string ('worker_hosts', '', 'workers - comma separated list of hostname:port pairs') - tf.app.flags.DEFINE_string ('job_name', 'localhost', 'job name - one of localhost (default), worker, ps') - tf.app.flags.DEFINE_integer ('task_index', 0, 'index of task within the job - worker with index 0 will be the chief') - tf.app.flags.DEFINE_integer ('replicas', -1, 'total number of replicas - if negative, its absolute value is multiplied by the number of workers') - tf.app.flags.DEFINE_integer ('replicas_to_agg', -1, 'number of replicas to aggregate - if negative, its absolute value is multiplied by the number of workers') - tf.app.flags.DEFINE_integer ('coord_retries', 100, 'number of tries of workers connecting to training coordinator before failing') - tf.app.flags.DEFINE_string ('coord_host', 'localhost', 'coordination server host') - tf.app.flags.DEFINE_integer ('coord_port', 2500, 'coordination server port') - tf.app.flags.DEFINE_integer ('iters_per_worker', 1, 'number of train or inference iterations per worker before results are sent back to coordinator') - - # Global Constants - # ================ - - tf.app.flags.DEFINE_boolean ('train', True, 'whether to train the network') - tf.app.flags.DEFINE_boolean ('test', True, 'whether to test the network') - tf.app.flags.DEFINE_integer ('epoch', 75, 'target epoch to train - if negative, the absolute number of additional epochs will be trained') - - tf.app.flags.DEFINE_float ('dropout_rate', 0.05, 'dropout rate for feedforward layers') - tf.app.flags.DEFINE_float ('dropout_rate2', -1.0, 'dropout rate for layer 2 - defaults to dropout_rate') - tf.app.flags.DEFINE_float ('dropout_rate3', -1.0, 'dropout rate for layer 3 - defaults to dropout_rate') - tf.app.flags.DEFINE_float ('dropout_rate4', 0.0, 'dropout rate for layer 4 - defaults to 0.0') - tf.app.flags.DEFINE_float ('dropout_rate5', 0.0, 'dropout rate for layer 5 - defaults to 0.0') - tf.app.flags.DEFINE_float ('dropout_rate6', -1.0, 'dropout rate for layer 6 - defaults to dropout_rate') - - tf.app.flags.DEFINE_float ('relu_clip', 20.0, 'ReLU clipping value for non-recurrant layers') - - # Adam optimizer (http://arxiv.org/abs/1412.6980) parameters - - tf.app.flags.DEFINE_float ('beta1', 0.9, 'beta 1 parameter of Adam optimizer') - tf.app.flags.DEFINE_float ('beta2', 0.999, 'beta 2 parameter of Adam optimizer') - tf.app.flags.DEFINE_float ('epsilon', 1e-8, 'epsilon parameter of Adam optimizer') - tf.app.flags.DEFINE_float ('learning_rate', 0.001, 'learning rate of Adam optimizer') - - # Batch sizes - - tf.app.flags.DEFINE_integer ('train_batch_size', 1, 'number of elements in a training batch') - tf.app.flags.DEFINE_integer ('dev_batch_size', 1, 'number of elements in a validation batch') - tf.app.flags.DEFINE_integer ('test_batch_size', 1, 'number of elements in a test batch') - - tf.app.flags.DEFINE_integer ('export_batch_size', 1, 'number of elements per batch on the exported graph') - - # Performance (UNSUPPORTED) - tf.app.flags.DEFINE_integer ('inter_op_parallelism_threads', 0, 'number of inter-op parallelism threads - see tf.ConfigProto for more details') - tf.app.flags.DEFINE_integer ('intra_op_parallelism_threads', 0, 'number of intra-op parallelism threads - see tf.ConfigProto for more details') - - # Sample limits - - tf.app.flags.DEFINE_integer ('limit_train', 0, 'maximum number of elements to use from train set - 0 means no limit') - tf.app.flags.DEFINE_integer ('limit_dev', 0, 'maximum number of elements to use from validation set- 0 means no limit') - tf.app.flags.DEFINE_integer ('limit_test', 0, 'maximum number of elements to use from test set- 0 means no limit') - - # Step widths - - tf.app.flags.DEFINE_integer ('display_step', 0, 'number of epochs we cycle through before displaying detailed progress - 0 means no progress display') - tf.app.flags.DEFINE_integer ('validation_step', 0, 'number of epochs we cycle through before validating the model - a detailed progress report is dependent on "--display_step" - 0 means no validation steps') - - # Checkpointing - - tf.app.flags.DEFINE_string ('checkpoint_dir', '', 'directory in which checkpoints are stored - defaults to directory "deepspeech/checkpoints" within user\'s data home specified by the XDG Base Directory Specification') - tf.app.flags.DEFINE_integer ('checkpoint_secs', 600, 'checkpoint saving interval in seconds') - tf.app.flags.DEFINE_integer ('max_to_keep', 5, 'number of checkpoint files to keep - default value is 5') - - # Exporting - - tf.app.flags.DEFINE_string ('export_dir', '', 'directory in which exported models are stored - if omitted, the model won\'t get exported') - tf.app.flags.DEFINE_integer ('export_version', 1, 'version number of the exported model') - tf.app.flags.DEFINE_boolean ('remove_export', False, 'whether to remove old exported models') - tf.app.flags.DEFINE_boolean ('export_tflite', False, 'export a graph ready for TF Lite engine') - tf.app.flags.DEFINE_boolean ('use_seq_length', True, 'have sequence_length in the exported graph (will make tfcompile unhappy)') - tf.app.flags.DEFINE_integer ('n_steps', 16, 'how many timesteps to process at once by the export graph, higher values mean more latency') - - # Reporting - - tf.app.flags.DEFINE_integer ('log_level', 1, 'log level for console logs - 0: INFO, 1: WARN, 2: ERROR, 3: FATAL') - tf.app.flags.DEFINE_boolean ('log_traffic', False, 'log cluster transaction and traffic information during debug logging') - tf.app.flags.DEFINE_boolean ('show_progressbar', True, 'Show progress for training, validation and testing processes. Log level should be > 0.') - - tf.app.flags.DEFINE_string ('wer_log_pattern', '', 'pattern for machine readable global logging of WER progress; has to contain %%s, %%s and %%f for the set name, the date and the float respectively; example: "GLOBAL LOG: logwer(\'12ade231\', %%s, %%s, %%f)" would result in some entry like "GLOBAL LOG: logwer(\'12ade231\', \'train\', \'2017-05-18T03:09:48-0700\', 0.05)"; if omitted (default), there will be no logging') - - tf.app.flags.DEFINE_boolean ('log_placement', False, 'whether to log device placement of the operators to the console') - tf.app.flags.DEFINE_integer ('report_count', 10, 'number of phrases with lowest WER (best matching) to print out during a WER report') - - tf.app.flags.DEFINE_string ('summary_dir', '', 'target directory for TensorBoard summaries - defaults to directory "deepspeech/summaries" within user\'s data home specified by the XDG Base Directory Specification') - tf.app.flags.DEFINE_integer ('summary_secs', 0, 'interval in seconds for saving TensorBoard summaries - if 0, no summaries will be written') - - # Geometry - - tf.app.flags.DEFINE_integer ('n_hidden', 2048, 'layer width to use when initialising layers') - - # Initialization - - tf.app.flags.DEFINE_integer ('random_seed', 4567, 'default random seed that is used to initialize variables') - - # Early Stopping - - tf.app.flags.DEFINE_boolean ('early_stop', True, 'enable early stopping mechanism over validation dataset. Make sure that dev FLAG is enabled for this to work') - - # This parameter is irrespective of the time taken by single epoch to complete and checkpoint saving intervals. - # It is possible that early stopping is triggered far after the best checkpoint is already replaced by checkpoint saving interval mechanism. - # One has to align the parameters (earlystop_nsteps, checkpoint_secs) accordingly as per the time taken by an epoch on different datasets. - - tf.app.flags.DEFINE_integer ('earlystop_nsteps', 4, 'number of steps to consider for early stopping. Loss is not stored in the checkpoint so when checkpoint is revived it starts the loss calculation from start at that point') - tf.app.flags.DEFINE_float ('estop_mean_thresh', 0.5, 'mean threshold for loss to determine the condition if early stopping is required') - tf.app.flags.DEFINE_float ('estop_std_thresh', 0.5, 'standard deviation threshold for loss to determine the condition if early stopping is required') - - # Decoder - - tf.app.flags.DEFINE_string ('decoder_library_path', 'native_client/libctc_decoder_with_kenlm.so', 'path to the libctc_decoder_with_kenlm.so library containing the decoder implementation.') - tf.app.flags.DEFINE_string ('alphabet_config_path', 'data/alphabet.txt', 'path to the configuration file specifying the alphabet used by the network. See the comment in data/alphabet.txt for a description of the format.') - tf.app.flags.DEFINE_string ('lm_binary_path', 'data/lm/lm.binary', 'path to the language model binary file created with KenLM') - tf.app.flags.DEFINE_string ('lm_trie_path', 'data/lm/trie', 'path to the language model trie file created with native_client/generate_trie') - tf.app.flags.DEFINE_integer ('beam_width', 1024, 'beam width used in the CTC decoder when building candidate transcriptions') - tf.app.flags.DEFINE_float ('lm_weight', 1.50, 'the alpha hyperparameter of the CTC decoder. Language Model weight.') - tf.app.flags.DEFINE_float ('valid_word_count_weight', 2.10, 'valid word insertion weight. This is used to lessen the word insertion penalty when the inserted word is part of the vocabulary.') - - # Inference mode - - tf.app.flags.DEFINE_string ('one_shot_infer', '', 'one-shot inference mode: specify a wav file and the script will load the checkpoint and perform inference on it. Disables training, testing and exporting.') - -FLAGS = tf.app.flags.FLAGS - -def initialize_globals(): - - # ps and worker hosts required for p2p cluster setup - FLAGS.ps_hosts = list(filter(len, FLAGS.ps_hosts.split(','))) - FLAGS.worker_hosts = list(filter(len, FLAGS.worker_hosts.split(','))) - - # Determine, if we are the chief worker - global is_chief - is_chief = len(FLAGS.worker_hosts) == 0 or (FLAGS.task_index == 0 and FLAGS.job_name == 'worker') - - # Initializing and starting the training coordinator - global COORD - COORD = TrainingCoordinator() - COORD.start() - - # The absolute number of computing nodes - regardless of cluster or single mode - global num_workers - num_workers = max(1, len(FLAGS.worker_hosts)) - - # Create a cluster from the parameter server and worker hosts. - global cluster - cluster = tf.train.ClusterSpec({'ps': FLAGS.ps_hosts, 'worker': FLAGS.worker_hosts}) - - # If replica numbers are negative, we multiply their absolute values with the number of workers - if FLAGS.replicas < 0: - FLAGS.replicas = num_workers * -FLAGS.replicas - if FLAGS.replicas_to_agg < 0: - FLAGS.replicas_to_agg = num_workers * -FLAGS.replicas_to_agg - - # The device path base for this node - global worker_device - worker_device = '/job:%s/task:%d' % (FLAGS.job_name, FLAGS.task_index) - - # This node's CPU device - global cpu_device - cpu_device = worker_device + '/cpu:0' - - # This node's available GPU devices - global available_devices - available_devices = [worker_device + gpu for gpu in get_available_gpus()] - - # If there is no GPU available, we fall back to CPU based operation - if 0 == len(available_devices): - available_devices = [cpu_device] - - # Set default dropout rates - if FLAGS.dropout_rate2 < 0: - FLAGS.dropout_rate2 = FLAGS.dropout_rate - if FLAGS.dropout_rate3 < 0: - FLAGS.dropout_rate3 = FLAGS.dropout_rate - if FLAGS.dropout_rate6 < 0: - FLAGS.dropout_rate6 = FLAGS.dropout_rate - - global dropout_rates - dropout_rates = [tf.placeholder(tf.float32, name='dropout_{}'.format(i)) for i in range(6)] - - global no_dropout - no_dropout = [ 0.0 ] * 6 - - # Set default checkpoint dir - if len(FLAGS.checkpoint_dir) == 0: - FLAGS.checkpoint_dir = xdg.save_data_path(os.path.join('deepspeech','checkpoints')) - - # Set default summary dir - if len(FLAGS.summary_dir) == 0: - FLAGS.summary_dir = xdg.save_data_path(os.path.join('deepspeech','summaries')) - - # Standard session configuration that'll be used for all new sessions. - global session_config - session_config = tf.ConfigProto(allow_soft_placement=True, log_device_placement=FLAGS.log_placement, - inter_op_parallelism_threads=FLAGS.inter_op_parallelism_threads, - intra_op_parallelism_threads=FLAGS.intra_op_parallelism_threads) - - global alphabet - alphabet = Alphabet(os.path.abspath(FLAGS.alphabet_config_path)) - - # Geometric Constants - # =================== - - # For an explanation of the meaning of the geometric constants, please refer to - # doc/Geometry.md - - # Number of MFCC features - global n_input - n_input = 26 # TODO: Determine this programatically from the sample rate - - # The number of frames in the context - global n_context - n_context = 9 # TODO: Determine the optimal value using a validation data set - - # Number of units in hidden layers - global n_hidden - n_hidden = FLAGS.n_hidden - - global n_hidden_1 - n_hidden_1 = n_hidden - - global n_hidden_2 - n_hidden_2 = n_hidden - - global n_hidden_5 - n_hidden_5 = n_hidden - - # LSTM cell state dimension - global n_cell_dim - n_cell_dim = n_hidden - - # The number of units in the third layer, which feeds in to the LSTM - global n_hidden_3 - n_hidden_3 = n_cell_dim - - # The number of characters in the target language plus one - global n_character - n_character = alphabet.size() + 1 # +1 for CTC blank label - - # The number of units in the sixth layer - global n_hidden_6 - n_hidden_6 = n_character - - # Queues that are used to gracefully stop parameter servers. - # Each queue stands for one ps. A finishing worker sends a token to each queue before joining/quitting. - # Each ps will dequeue as many tokens as there are workers before joining/quitting. - # This ensures parameter servers won't quit, if still required by at least one worker and - # also won't wait forever (like with a standard `server.join()`). - global done_queues - done_queues = [] - for i, ps in enumerate(FLAGS.ps_hosts): - # Queues are hosted by their respective owners - with tf.device('/job:ps/task:%d' % i): - done_queues.append(tf.FIFOQueue(1, tf.int32, shared_name=('queue%i' % i))) - - # Placeholder to pass in the worker's index as token - global token_placeholder - token_placeholder = tf.placeholder(tf.int32) - - # Enqueue operations for each parameter server - global done_enqueues - done_enqueues = [queue.enqueue(token_placeholder) for queue in done_queues] - - # Dequeue operations for each parameter server - global done_dequeues - done_dequeues = [queue.dequeue() for queue in done_queues] - - if len(FLAGS.one_shot_infer) > 0: - FLAGS.train = False - FLAGS.test = False - FLAGS.export_dir = '' - if not os.path.exists(FLAGS.one_shot_infer): - log_error('Path specified in --one_shot_infer is not a valid file.') - exit(1) - - if not os.path.exists(os.path.abspath(FLAGS.decoder_library_path)): - print('ERROR: The decoder library file does not exist. Make sure you have ' \ - 'downloaded or built the native client binaries and pass the ' \ - 'appropriate path to the binaries in the --decoder_library_path parameter.') - - global custom_op_module - custom_op_module = tf.load_op_library(FLAGS.decoder_library_path) - - -# Logging functions -# ================= - -def prefix_print(prefix, message): - print(prefix + ('\n' + prefix).join(message.split('\n'))) - -def log_debug(message): - if FLAGS.log_level == 0: - prefix_print('D ', message) - -def log_traffic(message): - if FLAGS.log_traffic: - log_debug(message) - -def log_info(message): - if FLAGS.log_level <= 1: - prefix_print('I ', message) - -def log_warn(message): - if FLAGS.log_level <= 2: - prefix_print('W ', message) - -def log_error(message): - if FLAGS.log_level <= 3: - prefix_print('E ', message) +from util.text import Alphabet # Graph Creation @@ -371,9 +41,9 @@ def variable_on_worker_level(name, shape, initializer): ''' # Use the /cpu:0 device on worker_device for scoped operations if len(FLAGS.ps_hosts) == 0: - device = worker_device + device = Config.worker_device else: - device = tf.train.replica_device_setter(worker_device=worker_device, cluster=cluster) + device = tf.train.replica_device_setter(worker_device=Config.worker_device, cluster=Config.cluster) with tf.device(device): # Create or get apropos variable @@ -407,29 +77,29 @@ def BiRNN(batch_x, seq_length, dropout, reuse=False, batch_size=None, n_steps=-1 # Permute n_steps and batch_size batch_x = tf.transpose(batch_x, [1, 0, 2, 3]) # Reshape to prepare input for first layer - batch_x = tf.reshape(batch_x, [-1, n_input + 2*n_input*n_context]) # (n_steps*batch_size, n_input + 2*n_input*n_context) + batch_x = tf.reshape(batch_x, [-1, Config.n_input + 2*Config.n_input*Config.n_context]) # (n_steps*batch_size, n_input + 2*n_input*n_context) layers['input_reshaped'] = batch_x # The next three blocks will pass `batch_x` through three hidden layers with # clipped RELU activation and dropout. # 1st layer - b1 = variable_on_worker_level('b1', [n_hidden_1], tf.zeros_initializer()) - h1 = variable_on_worker_level('h1', [n_input + 2*n_input*n_context, n_hidden_1], tf.contrib.layers.xavier_initializer()) + b1 = variable_on_worker_level('b1', [Config.n_hidden_1], tf.zeros_initializer()) + h1 = variable_on_worker_level('h1', [Config.n_input + 2*Config.n_input*Config.n_context, Config.n_hidden_1], tf.contrib.layers.xavier_initializer()) layer_1 = tf.minimum(tf.nn.relu(tf.add(tf.matmul(batch_x, h1), b1)), FLAGS.relu_clip) layer_1 = tf.nn.dropout(layer_1, (1.0 - dropout[0])) layers['layer_1'] = layer_1 # 2nd layer - b2 = variable_on_worker_level('b2', [n_hidden_2], tf.zeros_initializer()) - h2 = variable_on_worker_level('h2', [n_hidden_1, n_hidden_2], tf.contrib.layers.xavier_initializer()) + b2 = variable_on_worker_level('b2', [Config.n_hidden_2], tf.zeros_initializer()) + h2 = variable_on_worker_level('h2', [Config.n_hidden_1, Config.n_hidden_2], tf.contrib.layers.xavier_initializer()) layer_2 = tf.minimum(tf.nn.relu(tf.add(tf.matmul(layer_1, h2), b2)), FLAGS.relu_clip) layer_2 = tf.nn.dropout(layer_2, (1.0 - dropout[1])) layers['layer_2'] = layer_2 # 3rd layer - b3 = variable_on_worker_level('b3', [n_hidden_3], tf.zeros_initializer()) - h3 = variable_on_worker_level('h3', [n_hidden_2, n_hidden_3], tf.contrib.layers.xavier_initializer()) + b3 = variable_on_worker_level('b3', [Config.n_hidden_3], tf.zeros_initializer()) + h3 = variable_on_worker_level('h3', [Config.n_hidden_2, Config.n_hidden_3], tf.contrib.layers.xavier_initializer()) layer_3 = tf.minimum(tf.nn.relu(tf.add(tf.matmul(layer_2, h3), b3)), FLAGS.relu_clip) layer_3 = tf.nn.dropout(layer_3, (1.0 - dropout[2])) layers['layer_3'] = layer_3 @@ -439,14 +109,14 @@ def BiRNN(batch_x, seq_length, dropout, reuse=False, batch_size=None, n_steps=-1 # Forward direction cell: if not tflite: - fw_cell = tf.contrib.rnn.LSTMBlockFusedCell(n_cell_dim, reuse=reuse) + fw_cell = tf.contrib.rnn.LSTMBlockFusedCell(Config.n_cell_dim, reuse=reuse) layers['fw_cell'] = fw_cell else: - fw_cell = tf.nn.rnn_cell.LSTMCell(n_cell_dim, reuse=reuse) + fw_cell = tf.nn.rnn_cell.LSTMCell(Config.n_cell_dim, reuse=reuse) # `layer_3` is now reshaped into `[n_steps, batch_size, 2*n_cell_dim]`, # as the LSTM RNN expects its input to be of shape `[max_time, batch_size, input_size]`. - layer_3 = tf.reshape(layer_3, [n_steps, batch_size, n_hidden_3]) + layer_3 = tf.reshape(layer_3, [n_steps, batch_size, Config.n_hidden_3]) if tflite: # Generated StridedSlice, not supported by NNAPI #n_layer_3 = [] @@ -467,48 +137,33 @@ def BiRNN(batch_x, seq_length, dropout, reuse=False, batch_size=None, n_steps=-1 # Reshape output from a tensor of shape [n_steps, batch_size, n_cell_dim] # to a tensor of shape [n_steps*batch_size, n_cell_dim] - output = tf.reshape(output, [-1, n_cell_dim]) + output = tf.reshape(output, [-1, Config.n_cell_dim]) layers['rnn_output'] = output layers['rnn_output_state'] = output_state # Now we feed `output` to the fifth hidden layer with clipped RELU activation and dropout - b5 = variable_on_worker_level('b5', [n_hidden_5], tf.zeros_initializer()) - h5 = variable_on_worker_level('h5', [n_cell_dim, n_hidden_5], tf.contrib.layers.xavier_initializer()) + b5 = variable_on_worker_level('b5', [Config.n_hidden_5], tf.zeros_initializer()) + h5 = variable_on_worker_level('h5', [Config.n_cell_dim, Config.n_hidden_5], tf.contrib.layers.xavier_initializer()) layer_5 = tf.minimum(tf.nn.relu(tf.add(tf.matmul(output, h5), b5)), FLAGS.relu_clip) layer_5 = tf.nn.dropout(layer_5, (1.0 - dropout[5])) layers['layer_5'] = layer_5 # Now we apply the weight matrix `h6` and bias `b6` to the output of `layer_5` # creating `n_classes` dimensional vectors, the logits. - b6 = variable_on_worker_level('b6', [n_hidden_6], tf.zeros_initializer()) - h6 = variable_on_worker_level('h6', [n_hidden_5, n_hidden_6], tf.contrib.layers.xavier_initializer()) + b6 = variable_on_worker_level('b6', [Config.n_hidden_6], tf.zeros_initializer()) + h6 = variable_on_worker_level('h6', [Config.n_hidden_5, Config.n_hidden_6], tf.contrib.layers.xavier_initializer()) layer_6 = tf.add(tf.matmul(layer_5, h6), b6) layers['layer_6'] = layer_6 # Finally we reshape layer_6 from a tensor of shape [n_steps*batch_size, n_hidden_6] # to the slightly more useful shape [n_steps, batch_size, n_hidden_6]. # Note, that this differs from the input in that it is time-major. - layer_6 = tf.reshape(layer_6, [n_steps, batch_size, n_hidden_6], name="raw_logits") + layer_6 = tf.reshape(layer_6, [n_steps, batch_size, Config.n_hidden_6], name="raw_logits") layers['raw_logits'] = layer_6 # Output shape: [n_steps, batch_size, n_hidden_6] return layer_6, layers -def decode_with_lm(inputs, sequence_length, beam_width=100, - top_paths=1, merge_repeated=True): - decoded_ixs, decoded_vals, decoded_shapes, log_probabilities = ( - custom_op_module.ctc_beam_search_decoder_with_lm( - inputs, sequence_length, beam_width=beam_width, - model_path=FLAGS.lm_binary_path, trie_path=FLAGS.lm_trie_path, alphabet_path=FLAGS.alphabet_config_path, - lm_weight=FLAGS.lm_weight, valid_word_count_weight=FLAGS.valid_word_count_weight, - top_paths=top_paths, merge_repeated=merge_repeated)) - - return ( - [tf.SparseTensor(ix, val, shape) for (ix, val, shape) - in zip(decoded_ixs, decoded_vals, decoded_shapes)], - log_probabilities) - - # Accuracy and Loss # ================= @@ -538,23 +193,8 @@ def calculate_mean_edit_distance_and_loss(model_feeder, tower, dropout, reuse): # Calculate the average loss across the batch avg_loss = tf.reduce_mean(total_loss) - # Beam search decode the batch - decoded, _ = decode_with_lm(logits, batch_seq_len, merge_repeated=False, beam_width=FLAGS.beam_width) - - # Compute the edit (Levenshtein) distance - distance = tf.edit_distance(tf.cast(decoded[0], tf.int32), batch_y) - - # Compute the mean edit distance - mean_edit_distance = tf.reduce_mean(distance) - - # Finally we return the - # - calculated total and - # - average losses, - # - the Levenshtein distance, - # - the recognition mean edit distance, - # - the decoded batch and - # - the original batch_y (which contains the verified transcriptions). - return total_loss, avg_loss, distance, mean_edit_distance, decoded, batch_y + # Finally we return the average loss + return avg_loss # Adam Optimization @@ -590,78 +230,38 @@ def create_optimizer(): # on which all operations within the tower execute. # For example, all operations of 'tower 0' could execute on the first GPU `tf.device('/gpu:0')`. -def get_tower_results(model_feeder, optimizer): +def get_tower_results(model_feeder, optimizer, dropout_rates): r''' With this preliminary step out of the way, we can for each GPU introduce a - tower for which's batch we calculate - - * The CTC decodings ``decoded``, - * The (total) loss against the outcome (Y) ``total_loss``, - * The loss averaged over the whole batch ``avg_loss``, - * The optimization gradient (computed based on the averaged loss), - * The Levenshtein distances between the decodings and their transcriptions ``distance``, - * The mean edit distance of the outcome averaged over the whole batch ``mean_edit_distance`` - - and retain the original ``labels`` (Y). - ``decoded``, ``labels``, the optimization gradient, ``distance``, ``mean_edit_distance``, - ``total_loss`` and ``avg_loss`` are collected into the corresponding arrays - ``tower_decodings``, ``tower_labels``, ``tower_gradients``, ``tower_distances``, - ``tower_mean_edit_distances``, ``tower_total_losses``, ``tower_avg_losses`` (dimension 0 being the tower). - Finally this new method ``get_tower_results()`` will return those tower arrays. - In case of ``tower_mean_edit_distances`` and ``tower_avg_losses``, it will return the - averaged values instead of the arrays. + tower for which's batch we calculate and return the optimization gradients + and the average loss across towers. ''' - # Tower labels to return - tower_labels = [] - - # Tower decodings to return - tower_decodings = [] - - # Tower distances to return - tower_distances = [] - - # Tower total batch losses to return - tower_total_losses = [] + # To calculate the mean of the losses + tower_avg_losses = [] # Tower gradients to return tower_gradients = [] - # To calculate the mean of the mean edit distances - tower_mean_edit_distances = [] - - # To calculate the mean of the losses - tower_avg_losses = [] - with tf.variable_scope(tf.get_variable_scope()): # Loop over available_devices - for i in range(len(available_devices)): + for i in range(len(Config.available_devices)): # Execute operations of tower i on device i if len(FLAGS.ps_hosts) == 0: - device = available_devices[i] + device = Config.available_devices[i] else: - device = tf.train.replica_device_setter(worker_device=available_devices[i], cluster=cluster) + device = tf.train.replica_device_setter(worker_device=Config.available_devices[i], cluster=Config.cluster) with tf.device(device): # Create a scope for all operations of tower i with tf.name_scope('tower_%d' % i) as scope: # Calculate the avg_loss and mean_edit_distance and retrieve the decoded # batch along with the original batch's labels (Y) of this tower - total_loss, avg_loss, distance, mean_edit_distance, decoded, labels = \ - calculate_mean_edit_distance_and_loss(model_feeder, i, dropout_rates, reuse=i>0) + avg_loss = calculate_mean_edit_distance_and_loss(model_feeder, i, dropout_rates, reuse=i>0) # Allow for variables to be re-used by the next tower tf.get_variable_scope().reuse_variables() - # Retain tower's labels (Y) - tower_labels.append(labels) - - # Retain tower's decoded batch - tower_decodings.append(decoded) - - # Retain tower's distances - tower_distances.append(distance) - - # Retain tower's total losses - tower_total_losses.append(total_loss) + # Retain tower's avg losses + tower_avg_losses.append(avg_loss) # Compute gradients for model parameters using tower's mini-batch gradients = optimizer.compute_gradients(avg_loss) @@ -669,21 +269,13 @@ def get_tower_results(model_feeder, optimizer): # Retain tower's gradients tower_gradients.append(gradients) - # Retain tower's mean edit distance - tower_mean_edit_distances.append(mean_edit_distance) - - # Retain tower's avg losses - tower_avg_losses.append(avg_loss) avg_loss_across_towers = tf.reduce_mean(tower_avg_losses, 0) tf.summary.scalar(name='step_loss', tensor=avg_loss_across_towers, collections=['step_summaries']) - # Return the results tuple, the gradients, and the means of mean edit distances and losses - return (tower_labels, tower_decodings, tower_distances, tower_total_losses), \ - tower_gradients, \ - tf.reduce_mean(tower_mean_edit_distances, 0), \ - avg_loss_across_towers + # Return gradients and the average loss + return tower_gradients, avg_loss_across_towers def average_gradients(tower_gradients): @@ -696,7 +288,7 @@ def average_gradients(tower_gradients): average_grads = [] # Run this on cpu_device to conserve GPU memory - with tf.device(cpu_device): + with tf.device(Config.cpu_device): # Loop over gradient/variable pairs from all towers for grad_and_vars in zip(*tower_gradients): # Introduce grads to store the gradients for the current variable @@ -756,771 +348,70 @@ def log_grads_and_vars(grads_and_vars): for gradient, variable in grads_and_vars: log_variable(variable, gradient=gradient) -def get_git_revision_hash(): - return subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip() - -def get_git_branch(): - return subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip() - # Helpers # ======= -def calculate_report(results_tuple): - r''' - This routine will calculate a WER report. - It'll compute the `mean` WER and create ``Sample`` objects of the ``report_count`` top lowest - loss items from the provided WER results tuple (only items with WER!=0 and ordered by their WER). - ''' - samples = [] - items = list(zip(*results_tuple)) - total_levenshtein = 0.0 - total_label_length = 0.0 - for label, decoding, distance, loss in items: - sample_wer = wer(label, decoding) - sample = Sample(label, decoding, loss, distance, sample_wer) - samples.append(sample) - total_levenshtein += levenshtein(label.split(), decoding.split()) - total_label_length += float(len(label.split())) - - # Getting the WER from the accumulated levenshteins and lengths - samples_wer = total_levenshtein / total_label_length - - # Filter out all items with WER=0 - samples = [s for s in samples if s.wer > 0] - - # Order the remaining items by their loss (lowest loss on top) - samples.sort(key=lambda s: s.loss) - - # Take only the first report_count items - samples = samples[:FLAGS.report_count] - - # Order this top FLAGS.report_count items by their WER (lowest WER on top) - samples.sort(key=lambda s: s.wer) - - return samples_wer, samples - -def collect_results(results_tuple, returns): - r''' - This routine will help collecting partial results for the WER reports. - The ``results_tuple`` is composed of an array of the original labels, - an array of the corresponding decodings, an array of the corrsponding - distances and an array of the corresponding losses. ``returns`` is built up - in a similar way, containing just the unprocessed results of one - ``session.run`` call (effectively of one batch). - Labels and decodings are converted to text before splicing them into their - corresponding results_tuple lists. In the case of decodings, - for now we just pick the first available path. - ''' - # Each of the arrays within results_tuple will get extended by a batch of each available device - for i in range(len(available_devices)): - # Collect the labels - results_tuple[0].extend(sparse_tensor_value_to_texts(returns[0][i], alphabet)) - - # Collect the decodings - at the moment we default to the first one - results_tuple[1].extend(sparse_tensor_value_to_texts(returns[1][i][0], alphabet)) - - # Collect the distances - results_tuple[2].extend(returns[2][i]) - - # Collect the losses - results_tuple[3].extend(returns[3][i]) - - -# For reporting we also need a standard way to do time measurements. -def stopwatch(start_duration=0): - r''' - This function will toggle a stopwatch. - The first call starts it, second call stops it, third call continues it etc. - So if you want to measure the accumulated time spent in a certain area of the code, - you can surround that code by stopwatch-calls like this: - - .. code:: python - - fun_time = 0 # initializes a stopwatch - [...] - for i in range(10): - [...] - # Starts/continues the stopwatch - fun_time is now a point in time (again) - fun_time = stopwatch(fun_time) - fun() - # Pauses the stopwatch - fun_time is now a duration - fun_time = stopwatch(fun_time) - [...] - # The following line only makes sense after an even call of :code:`fun_time = stopwatch(fun_time)`. - print 'Time spent in fun():', format_duration(fun_time) - - ''' - if start_duration == 0: - return datetime.datetime.utcnow() - else: - return datetime.datetime.utcnow() - start_duration - -def format_duration(duration): - '''Formats the result of an even stopwatch call as hours:minutes:seconds''' - duration = duration if isinstance(duration, int) else duration.seconds - m, s = divmod(duration, 60) - h, m = divmod(m, 60) - return '%d:%02d:%02d' % (h, m, s) - - -# Execution -# ========= - -# String constants for different services of the web handler -PREFIX_NEXT_INDEX = '/next_index_' -PREFIX_GET_JOB = '/get_job_' - -# Global ID counter for all objects requiring an ID -id_counter = 0 - -def new_id(): - '''Returns a new ID that is unique on process level. Not thread-safe. - - Returns: - int. The new ID - ''' - global id_counter - id_counter += 1 - return id_counter - -class Sample(object): - '''Represents one item of a WER report. - - Args: - src (str): source text - res (str): resulting text - loss (float): computed loss of this item - mean_edit_distance (float): computed mean edit distance of this item - ''' - def __init__(self, src, res, loss, mean_edit_distance, sample_wer): - self.src = src - self.res = res - self.loss = loss - self.mean_edit_distance = mean_edit_distance - self.wer = sample_wer - - def __str__(self): - return 'WER: %f, loss: %f, mean edit distance: %f\n - src: "%s"\n - res: "%s"' % (self.wer, self.loss, self.mean_edit_distance, self.src, self.res) - -class WorkerJob(object): - '''Represents a job that should be executed by a worker. - - Args: - epoch_id (int): the ID of the 'parent' epoch - index (int): the epoch index of the 'parent' epoch - set_name (str): the name of the data-set - one of 'train', 'dev', 'test' - steps (int): the number of `session.run` calls - report (bool): if this job should produce a WER report - ''' - def __init__(self, epoch_id, index, set_name, steps, report): - self.id = new_id() - self.epoch_id = epoch_id - self.index = index - self.worker = -1 - self.set_name = set_name - self.steps = steps - self.report = report - self.loss = -1 - self.mean_edit_distance = -1 - self.wer = -1 - self.samples = [] - - def __str__(self): - return 'Job (ID: %d, worker: %d, epoch: %d, set_name: %s)' % (self.id, self.worker, self.index, self.set_name) - -class Epoch(object): - '''Represents an epoch that should be executed by the Training Coordinator. - Creates `num_jobs` `WorkerJob` instances in state 'open'. - - Args: - index (int): the epoch index of the 'parent' epoch - num_jobs (int): the number of jobs in this epoch - - Kwargs: - set_name (str): the name of the data-set - one of 'train', 'dev', 'test' - report (bool): if this job should produce a WER report - ''' - def __init__(self, index, num_jobs, set_name='train', report=False): - self.id = new_id() - self.index = index - self.num_jobs = num_jobs - self.set_name = set_name - self.report = report - self.wer = -1 - self.loss = -1 - self.mean_edit_distance = -1 - self.jobs_open = [] - self.jobs_running = [] - self.jobs_done = [] - self.samples = [] - for i in range(self.num_jobs): - self.jobs_open.append(WorkerJob(self.id, self.index, self.set_name, FLAGS.iters_per_worker, self.report)) - - def name(self): - '''Gets a printable name for this epoch. - - Returns: - str. printable name for this epoch - ''' - if self.index >= 0: - ename = ' of Epoch %d' % self.index - else: - ename = '' - if self.set_name == 'train': - return 'Training%s' % ename - elif self.set_name == 'dev': - return 'Validation%s' % ename - else: - return 'Test%s' % ename - - def get_job(self, worker): - '''Gets the next open job from this epoch. The job will be marked as 'running'. - - Args: - worker (int): index of the worker that takes the job - - Returns: - WorkerJob. job that has been marked as running for this worker - ''' - if len(self.jobs_open) > 0: - job = self.jobs_open.pop(0) - self.jobs_running.append(job) - job.worker = worker - return job - else: - return None - - def finish_job(self, job): - '''Finishes a running job. Removes it from the running jobs list and adds it to the done jobs list. - - Args: - job (WorkerJob): the job to put into state 'done' - ''' - index = next((i for i in range(len(self.jobs_running)) if self.jobs_running[i].id == job.id), -1) - if index >= 0: - self.jobs_running.pop(index) - self.jobs_done.append(job) - log_traffic('%s - Moved %s from running to done.' % (self.name(), job)) - else: - log_warn('%s - There is no job with ID %d registered as running.' % (self.name(), job.id)) - - def done(self): - '''Checks, if all jobs of the epoch are in state 'done'. - It also lazy-prepares a WER report from the result data of all jobs. - - Returns: - bool. if all jobs of the epoch are 'done' - ''' - if len(self.jobs_open) == 0 and len(self.jobs_running) == 0: - num_jobs = len(self.jobs_done) - if num_jobs > 0: - jobs = self.jobs_done - self.jobs_done = [] - if not self.num_jobs == num_jobs: - log_warn('%s - Number of steps not equal to number of jobs done.' % (self.name())) - - agg_loss = 0.0 - agg_wer = 0.0 - agg_mean_edit_distance = 0.0 - - for i in range(num_jobs): - job = jobs.pop(0) - agg_loss += job.loss - if self.report: - agg_wer += job.wer - agg_mean_edit_distance += job.mean_edit_distance - self.samples.extend(job.samples) - - self.loss = agg_loss / num_jobs - - # if the job was for validation dataset then append it to the COORD's _loss for early stop verification - if (FLAGS.early_stop is True) and (self.set_name == 'dev'): - COORD._dev_losses.append(self.loss) - - if self.report: - self.wer = agg_wer / num_jobs - self.mean_edit_distance = agg_mean_edit_distance / num_jobs - - # Order samles by their loss (lowest loss on top) - self.samples.sort(key=lambda s: s.loss) - - # Take only the first report_count items - self.samples = self.samples[:FLAGS.report_count] - - # Order this top FLAGS.report_count items by their WER (lowest WER on top) - self.samples.sort(key=lambda s: s.wer) - - # Append WER to WER log file - if len(FLAGS.wer_log_pattern) > 0: - time = datetime.datetime.utcnow().isoformat() - # Log WER progress - print(FLAGS.wer_log_pattern % (time, self.set_name, self.wer)) - - return True - return False - - def job_status(self): - '''Provides a printable overview of the states of the jobs of this epoch. - - Returns: - str. printable overall job state - ''' - return '%s - jobs open: %d, jobs running: %d, jobs done: %d' % (self.name(), len(self.jobs_open), len(self.jobs_running), len(self.jobs_done)) - - def __str__(self): - if not self.done(): - return self.job_status() - - if not self.report: - return '%s - loss: %f' % (self.name(), self.loss) - - s = '%s - WER: %f, loss: %s, mean edit distance: %f' % (self.name(), self.wer, self.loss, self.mean_edit_distance) - if len(self.samples) > 0: - line = '\n' + ('-' * 80) - for sample in self.samples: - s += '%s\n%s' % (line, sample) - s += line - return s - - -class TrainingCoordinator(object): - ''' Central training coordination class. - Used for distributing jobs among workers of a cluster. - Instantiated on all workers, calls of non-chief workers will transparently - HTTP-forwarded to the chief worker instance. - ''' - - class TrainingCoordinationHandler(BaseHTTPServer.BaseHTTPRequestHandler): - '''Handles HTTP requests from remote workers to the Training Coordinator. - ''' - def _send_answer(self, data=None): - self.send_response(200) - self.send_header('content-type', 'text/plain') - self.end_headers() - if data: - self.wfile.write(data) - - def do_GET(self): - if COORD.started: - if self.path.startswith(PREFIX_NEXT_INDEX): - index = COORD.get_next_index(self.path[len(PREFIX_NEXT_INDEX):]) - if index >= 0: - self._send_answer(str(index).encode("utf-8")) - return - elif self.path.startswith(PREFIX_GET_JOB): - job = COORD.get_job(worker=int(self.path[len(PREFIX_GET_JOB):])) - if job: - self._send_answer(pickle.dumps(job)) - return - self.send_response(204) # end of training - else: - self.send_response(202) # not ready yet - self.end_headers() - - def do_POST(self): - if COORD.started: - src = self.rfile.read(int(self.headers['content-length'])) - job = COORD.next_job(pickle.loads(src)) - if job: - self._send_answer(pickle.dumps(job)) - return - self.send_response(204) # end of training - else: - self.send_response(202) # not ready yet - self.end_headers() - - def log_message(self, format, *args): - '''Overriding base method to suppress web handler messages on stdout. - ''' - return - - def __init__(self): - self._init() - self._lock = Lock() - self.started = False - if is_chief: - self._httpd = BaseHTTPServer.HTTPServer((FLAGS.coord_host, FLAGS.coord_port), TrainingCoordinator.TrainingCoordinationHandler) - - def _reset_counters(self): - self._index_train = 0 - self._index_dev = 0 - self._index_test = 0 - - def _init(self): - self._epochs_running = [] - self._epochs_done = [] - self._reset_counters() - self._dev_losses = [] - - def _log_all_jobs(self): - '''Use this to debug-print epoch state''' - log_debug('Epochs - running: %d, done: %d' % (len(self._epochs_running), len(self._epochs_done))) - for epoch in self._epochs_running: - log_debug(' - running: ' + epoch.job_status()) - - def start_coordination(self, model_feeder, step=0): - '''Starts to coordinate epochs and jobs among workers on base of - data-set sizes, the (global) step and FLAGS parameters. - - Args: - model_feeder (ModelFeeder): data-sets to be used for coordinated training - - Kwargs: - step (int): global step of a loaded model to determine starting point - ''' - with self._lock: - self._init() - - # Number of GPUs per worker - fixed for now by local reality or cluster setup - gpus_per_worker = len(available_devices) - - # Number of batches processed per job per worker - batches_per_job = gpus_per_worker * max(1, FLAGS.iters_per_worker) - - # Number of batches per global step - batches_per_step = gpus_per_worker * max(1, FLAGS.replicas_to_agg) - - # Number of global steps per epoch - to be at least 1 - steps_per_epoch = max(1, model_feeder.train.total_batches // batches_per_step) - - # The start epoch of our training - self._epoch = step // steps_per_epoch - - # Number of additional 'jobs' trained already 'on top of' our start epoch - jobs_trained = (step % steps_per_epoch) * batches_per_step // batches_per_job - - # Total number of train/dev/test jobs covering their respective whole sets (one epoch) - self._num_jobs_train = max(1, model_feeder.train.total_batches // batches_per_job) - self._num_jobs_dev = max(1, model_feeder.dev.total_batches // batches_per_job) - self._num_jobs_test = max(1, model_feeder.test.total_batches // batches_per_job) - - if FLAGS.epoch < 0: - # A negative epoch means to add its absolute number to the epochs already computed - self._target_epoch = self._epoch + abs(FLAGS.epoch) - else: - self._target_epoch = FLAGS.epoch - - # State variables - # We only have to train, if we are told so and are not at the target epoch yet - self._train = FLAGS.train and self._target_epoch > self._epoch - self._test = FLAGS.test - - if self._train: - # The total number of jobs for all additional epochs to be trained - # Will be decremented for each job that is produced/put into state 'open' - self._num_jobs_train_left = (self._target_epoch - self._epoch) * self._num_jobs_train - jobs_trained - log_info('STARTING Optimization') - self._training_time = stopwatch() - - # Important for debugging - log_debug('step: %d' % step) - log_debug('epoch: %d' % self._epoch) - log_debug('target epoch: %d' % self._target_epoch) - log_debug('steps per epoch: %d' % steps_per_epoch) - log_debug('number of batches in train set: %d' % model_feeder.train.total_batches) - log_debug('batches per job: %d' % batches_per_job) - log_debug('batches per step: %d' % batches_per_step) - log_debug('number of jobs in train set: %d' % self._num_jobs_train) - log_debug('number of jobs already trained in first epoch: %d' % jobs_trained) - - self._next_epoch() - - # The coordinator is ready to serve - self.started = True - - def _next_epoch(self): - # State-machine of the coordination process - - # Indicates, if there were 'new' epoch(s) provided - result = False - - # Make sure that early stop is enabled and validation part is enabled - if (FLAGS.early_stop is True) and (FLAGS.validation_step > 0) and (len(self._dev_losses) >= FLAGS.earlystop_nsteps): - - # Calculate the mean of losses for past epochs - mean_loss = np.mean(self._dev_losses[-FLAGS.earlystop_nsteps:-1]) - # Calculate the standard deviation for losses from validation part in the past epochs - std_loss = np.std(self._dev_losses[-FLAGS.earlystop_nsteps:-1]) - # Update the list of losses incurred - self._dev_losses = self._dev_losses[-FLAGS.earlystop_nsteps:] - log_debug('Checking for early stopping (last %d steps) validation loss: %f, with standard deviation: %f and mean: %f' % (FLAGS.earlystop_nsteps, self._dev_losses[-1], std_loss, mean_loss)) - - # Check if validation loss has started increasing or is not decreasing substantially, making sure slight fluctuations don't bother the early stopping from working - if self._dev_losses[-1] > np.max(self._dev_losses[:-1]) or (abs(self._dev_losses[-1] - mean_loss) < FLAGS.estop_mean_thresh and std_loss < FLAGS.estop_std_thresh): - # Time to early stop - log_info('Early stop triggered as (for last %d steps) validation loss: %f with standard deviation: %f and mean: %f' % (FLAGS.earlystop_nsteps, self._dev_losses[-1], std_loss, mean_loss)) - self._dev_losses = [] - self._end_training() - self._train = False - - if self._train: - # We are in train mode - if self._num_jobs_train_left > 0: - # There are still jobs left - num_jobs_train = min(self._num_jobs_train_left, self._num_jobs_train) - self._num_jobs_train_left -= num_jobs_train - - # Let's try our best to keep the notion of curriculum learning - self._reset_counters() - - # If the training part of the current epoch should generate a WER report - is_display_step = FLAGS.display_step > 0 and (FLAGS.display_step == 1 or self._epoch > 0) and (self._epoch % FLAGS.display_step == 0 or self._epoch == self._target_epoch) - # Append the training epoch - self._epochs_running.append(Epoch(self._epoch, num_jobs_train, set_name='train', report=is_display_step)) - - if FLAGS.validation_step > 0 and (FLAGS.validation_step == 1 or self._epoch > 0) and self._epoch % FLAGS.validation_step == 0: - # The current epoch should also have a validation part - self._epochs_running.append(Epoch(self._epoch, self._num_jobs_dev, set_name='dev', report=is_display_step)) - - - # Indicating that there were 'new' epoch(s) provided - result = True - else: - # No jobs left, but still in train mode: concluding training - self._end_training() - self._train = False - - if self._test and not self._train: - # We shall test, and are not in train mode anymore - self._test = False - self._epochs_running.append(Epoch(self._epoch, self._num_jobs_test, set_name='test', report=True)) - # Indicating that there were 'new' epoch(s) provided - result = True - - if result: - # Increment the epoch index - shared among train and test 'state' - self._epoch += 1 - return result - - def _end_training(self): - self._training_time = stopwatch(self._training_time) - log_info('FINISHED Optimization - training time: %s' % format_duration(self._training_time)) - - def start(self): - '''Starts Training Coordinator. If chief, it starts a web server for - communication with non-chief instances. - ''' - if is_chief: - log_debug('Starting coordinator...') - self._thread = Thread(target=self._httpd.serve_forever) - self._thread.daemon = True - self._thread.start() - log_debug('Coordinator started.') - - def stop(self, wait_for_running_epochs=True): - '''Stops Training Coordinator. If chief, it waits for all epochs to be - 'done' and then shuts down the web server. - ''' - if is_chief: - if wait_for_running_epochs: - while len(self._epochs_running) > 0: - log_traffic('Coordinator is waiting for epochs to finish...') - time.sleep(5) - log_debug('Stopping coordinator...') - self._httpd.shutdown() - log_debug('Coordinator stopped.') - - def _talk_to_chief(self, path, data=None, default=None): - tries = 0 - while tries < FLAGS.coord_retries: - tries += 1 - try: - url = 'http://%s:%d%s' % (FLAGS.coord_host, FLAGS.coord_port, path) - log_traffic('Contacting coordinator - url: %s, tries: %d ...' % (url, tries-1)) - res = urllib.request.urlopen(urllib.request.Request(url, data, { 'content-type': 'text/plain' })) - str = res.read() - status = res.getcode() - log_traffic('Coordinator responded - url: %s, status: %s' % (url, status)) - if status == 200: - return str - if status == 204: # We use 204 (no content) to indicate end of training - return default - except urllib.error.HTTPError as error: - log_traffic('Problem reaching coordinator - url: %s, HTTP code: %d' % (url, error.code)) - pass - time.sleep(10) - return default - - def get_next_index(self, set_name): - '''Retrives a new cluster-unique batch index for a given set-name. - Prevents applying one batch multiple times per epoch. - - Args: - set_name (str): name of the data set - one of 'train', 'dev', 'test' - - Returns: - int. new data set index - ''' - with self._lock: - if is_chief: - member = '_index_' + set_name - value = getattr(self, member, -1) - setattr(self, member, value + 1) - return value - else: - # We are a remote worker and have to hand over to the chief worker by HTTP - log_traffic('Asking for next index...') - value = int(self._talk_to_chief(PREFIX_NEXT_INDEX + set_name)) - log_traffic('Got index %d.' % value) - return value - - def _get_job(self, worker=0): - job = None - # Find first running epoch that provides a next job - for epoch in self._epochs_running: - job = epoch.get_job(worker) - if job: - return job - # No next job found - return None - - def get_job(self, worker=0): - '''Retrieves the first job for a worker. - - Kwargs: - worker (int): index of the worker to get the first job for - - Returns: - WorkerJob. a job of one of the running epochs that will get - associated with the given worker and put into state 'running' - ''' - # Let's ensure that this does not interfere with other workers/requests - with self._lock: - if is_chief: - # First try to get a next job - job = self._get_job(worker) - - if job is None: - # If there was no next job, we give it a second chance by triggering the epoch state machine - if self._next_epoch(): - # Epoch state machine got a new epoch - # Second try to get a next job - job = self._get_job(worker) - if job is None: - # Albeit the epoch state machine got a new epoch, the epoch had no new job for us - log_error('Unexpected case - no job for worker %d.' % (worker)) - return job - - # Epoch state machine has no new epoch - # This happens at the end of the whole training - nothing to worry about - log_traffic('No jobs left for worker %d.' % (worker)) - self._log_all_jobs() - return None - - # We got a new job from one of the currently running epochs - log_traffic('Got new %s' % job) - return job - - # We are a remote worker and have to hand over to the chief worker by HTTP - result = self._talk_to_chief(PREFIX_GET_JOB + str(FLAGS.task_index)) - if result: - result = pickle.loads(result) - return result - - def next_job(self, job): - '''Sends a finished job back to the coordinator and retrieves in exchange the next one. - - Kwargs: - job (WorkerJob): job that was finished by a worker and who's results are to be - digested by the coordinator - - Returns: - WorkerJob. next job of one of the running epochs that will get - associated with the worker from the finished job and put into state 'running' - ''' - if is_chief: - # Try to find the epoch the job belongs to - epoch = next((epoch for epoch in self._epochs_running if epoch.id == job.epoch_id), None) - if epoch: - # We are going to manipulate things - let's avoid undefined state - with self._lock: - # Let the epoch finish the job - epoch.finish_job(job) - # Check, if epoch is done now - if epoch.done(): - # If it declares itself done, move it from 'running' to 'done' collection - self._epochs_running.remove(epoch) - self._epochs_done.append(epoch) - log_info('%s' % epoch) - else: - # There was no running epoch found for this job - this should never happen. - log_error('There is no running epoch of ID %d for job with ID %d. This should never happen.' % (job.epoch_id, job.id)) - return self.get_job(job.worker) - - # We are a remote worker and have to hand over to the chief worker by HTTP - result = self._talk_to_chief('', data=pickle.dumps(job)) - if result: - result = pickle.loads(result) - return result - def send_token_to_ps(session, kill=False): # Sending our token (the task_index as a debug opportunity) to each parameter server. # kill switch tokens are negative and decremented by 1 to deal with task_index 0 token = -FLAGS.task_index-1 if kill else FLAGS.task_index kind = 'kill switch' if kill else 'stop' - for index, enqueue in enumerate(done_enqueues): + for index, enqueue in enumerate(Config.done_enqueues): log_debug('Sending %s token to ps %d...' % (kind, index)) - session.run(enqueue, feed_dict={ token_placeholder: token }) + session.run(enqueue, feed_dict={ Config.token_placeholder: token }) log_debug('Sent %s token to ps %d.' % (kind, index)) + def train(server=None): r''' Trains the network on a given server of a cluster. If no server provided, it performs single process training. ''' + # Initializing and starting the training coordinator + coord = TrainingCoordinator(Config.is_chief) + coord.start() + # Create a variable to hold the global_step. # It will automagically get incremented by the optimizer. global_step = tf.Variable(0, trainable=False, name='global_step') + dropout_rates = [tf.placeholder(tf.float32, name='dropout_{}'.format(i)) for i in range(6)] + # Reading training set train_data = preprocess(FLAGS.train_files.split(','), FLAGS.train_batch_size, - n_input, - n_context, - alphabet, + Config.n_input, + Config.n_context, + Config.alphabet, hdf5_cache_path=FLAGS.train_cached_features_path) train_set = DataSet(train_data, FLAGS.train_batch_size, limit=FLAGS.limit_train, - next_index=lambda i: COORD.get_next_index('train')) + next_index=lambda i: coord.get_next_index('train')) # Reading validation set dev_data = preprocess(FLAGS.dev_files.split(','), FLAGS.dev_batch_size, - n_input, - n_context, - alphabet, + Config.n_input, + Config.n_context, + Config.alphabet, hdf5_cache_path=FLAGS.dev_cached_features_path) dev_set = DataSet(dev_data, FLAGS.dev_batch_size, limit=FLAGS.limit_dev, - next_index=lambda i: COORD.get_next_index('dev')) - - # Reading test set - test_data = preprocess(FLAGS.test_files.split(','), - FLAGS.test_batch_size, - n_input, - n_context, - alphabet, - hdf5_cache_path=FLAGS.test_cached_features_path) - - test_set = DataSet(test_data, - FLAGS.test_batch_size, - limit=FLAGS.limit_test, - next_index=lambda i: COORD.get_next_index('test')) + next_index=lambda i: coord.get_next_index('dev')) # Combining all sets to a multi set model feeder model_feeder = ModelFeeder(train_set, dev_set, - test_set, - n_input, - n_context, - alphabet, - tower_feeder_count=len(available_devices)) + Config.n_input, + Config.n_context, + Config.alphabet, + tower_feeder_count=len(Config.available_devices)) # Create the optimizer optimizer = create_optimizer() @@ -1532,7 +423,7 @@ def train(server=None): total_num_replicas=FLAGS.replicas) # Get the data_set specific graph end-points - results_tuple, gradients, mean_edit_distance, loss = get_tower_results(model_feeder, optimizer) + gradients, loss = get_tower_results(model_feeder, optimizer, dropout_rates) # Average tower gradients across GPUs avg_tower_gradients = average_gradients(gradients) @@ -1548,8 +439,7 @@ def train(server=None): step_summary_writers = { 'train': tf.summary.FileWriter(os.path.join(FLAGS.summary_dir, 'train'), max_queue=120), - 'dev': tf.summary.FileWriter(os.path.join(FLAGS.summary_dir, 'dev'), max_queue=120), - 'test': tf.summary.FileWriter(os.path.join(FLAGS.summary_dir, 'test'), max_queue=120) + 'dev': tf.summary.FileWriter(os.path.join(FLAGS.summary_dir, 'dev'), max_queue=120) } # Apply gradients to modify the model @@ -1618,17 +508,14 @@ def update_progressbar(set_name): update_progressbar.total_jobs = None update_progressbar.current_job_index = 0 - current_epoch = COORD._epoch-1 + current_epoch = coord._epoch-1 if set_name == "train": log_info('Training epoch %i...' % current_epoch) - update_progressbar.total_jobs = COORD._num_jobs_train - elif set_name == "dev": + update_progressbar.total_jobs = coord._num_jobs_train + else: log_info('Validating epoch %i...' % current_epoch) - update_progressbar.total_jobs = COORD._num_jobs_dev - elif set_name == "test": - log_info('Testing epoch %i...' % current_epoch) - update_progressbar.total_jobs = COORD._num_jobs_test + update_progressbar.total_jobs = coord._num_jobs_dev # recreate pbar update_progressbar.pbar = progressbar.ProgressBar(max_value=update_progressbar.total_jobs, @@ -1649,22 +536,22 @@ def update_progressbar(set_name): # or an error occurs. try: with tf.train.MonitoredTrainingSession(master='' if server is None else server.target, - is_chief=is_chief, + is_chief=Config.is_chief, hooks=hooks, checkpoint_dir=FLAGS.checkpoint_dir, save_checkpoint_secs=None, # already taken care of by a hook - config=session_config) as session: + config=Config.session_config) as session: tf.get_default_graph().finalize() try: - if is_chief: + if Config.is_chief: # Retrieving global_step from the (potentially restored) model model_feeder.set_data_set(no_dropout_feed_dict, model_feeder.train) step = session.run(global_step, feed_dict=no_dropout_feed_dict) - COORD.start_coordination(model_feeder, step) + coord.start_coordination(model_feeder, step) # Get the first job - job = COORD.get_job() + job = coord.get_job() while job and not session.should_stop(): log_debug('Computing %s...' % job) @@ -1693,17 +580,6 @@ def update_progressbar(set_name): # Setting the training operation in case of training requested train_op = apply_gradient_op if is_train else [] - # Requirements to display a WER report - if job.report: - # Reset mean edit distance - total_mean_edit_distance = 0.0 - # Create report results tuple - report_results = ([],[],[],[]) - # Extend the session.run parameters - report_params = [results_tuple, mean_edit_distance] - else: - report_params = [] - # So far the only extra parameter is the feed_dict extra_params = { 'feed_dict': feed_dict } @@ -1716,7 +592,7 @@ def update_progressbar(set_name): log_debug('Starting batch...') # Compute the batch - _, current_step, batch_loss, batch_report, step_summary = session.run([train_op, global_step, loss, report_params, step_summaries_op], **extra_params) + _, current_step, batch_loss, step_summary = session.run([train_op, global_step, loss, step_summaries_op], **extra_params) # Log step summaries step_summary_writer.add_summary(step_summary, current_step) @@ -1727,17 +603,8 @@ def update_progressbar(set_name): # Add batch to loss total_loss += batch_loss - if job.report: - # Collect individual sample results - collect_results(report_results, batch_report[0]) - # Add batch to total_mean_edit_distance - total_mean_edit_distance += batch_report[1] - # Gathering job results job.loss = total_loss / job.steps - if job.report: - job.mean_edit_distance = total_mean_edit_distance / job.steps - job.wer, job.samples = calculate_report(report_results) # Display progressbar if FLAGS.show_progressbar: @@ -1745,7 +612,7 @@ def update_progressbar(set_name): # Send the current job to coordinator and receive the next one log_debug('Sending %s...' % job) - job = COORD.next_job(job) + job = coord.next_job(job) if update_progressbar.pbar: update_progressbar.pbar.finish() @@ -1759,7 +626,7 @@ def update_progressbar(set_name): # Only chief has a SyncReplicasOptimizer queue runner that needs to be stopped for unblocking process exit. # A rather graceful way to do this is by stopping the ps. # Only one party can send it w/o failing. - if is_chief: + if Config.is_chief: send_token_to_ps(session, kill=True) sys.exit(1) @@ -1773,20 +640,40 @@ def update_progressbar(set_name): ' or removing the contents of {0}.'.format(FLAGS.checkpoint_dir)) sys.exit(1) -def create_inference_graph(batch_size=1, n_steps=16, use_new_decoder=False, tflite=False): + # Stopping the coordinator + coord.stop() + + +def test(): + # Reading test set + test_data = preprocess(FLAGS.test_files.split(','), + FLAGS.test_batch_size, + Config.n_input, + Config.n_context, + Config.alphabet, + hdf5_cache_path=FLAGS.test_cached_features_path) + + graph = create_inference_graph(batch_size=FLAGS.test_batch_size, n_steps=-1) + + evaluate.evaluate(test_data, graph, Config.alphabet) + + +def create_inference_graph(batch_size=1, n_steps=16, tflite=False): # Input tensor will be of shape [batch_size, n_steps, 2*n_context+1, n_input] - input_tensor = tf.placeholder(tf.float32, [batch_size, n_steps if n_steps > 0 else None, 2*n_context+1, n_input], name='input_node') + input_tensor = tf.placeholder(tf.float32, [batch_size, n_steps if n_steps > 0 else None, 2*Config.n_context+1, Config.n_input], name='input_node') seq_length = tf.placeholder(tf.int32, [batch_size], name='input_lengths') if not tflite: - previous_state_c = variable_on_worker_level('previous_state_c', [batch_size, n_cell_dim], initializer=None) - previous_state_h = variable_on_worker_level('previous_state_h', [batch_size, n_cell_dim], initializer=None) + previous_state_c = variable_on_worker_level('previous_state_c', [batch_size, Config.n_cell_dim], initializer=None) + previous_state_h = variable_on_worker_level('previous_state_h', [batch_size, Config.n_cell_dim], initializer=None) else: - previous_state_c = tf.placeholder(tf.float32, [batch_size, n_cell_dim], name='previous_state_c') - previous_state_h = tf.placeholder(tf.float32, [batch_size, n_cell_dim], name='previous_state_h') + previous_state_c = tf.placeholder(tf.float32, [batch_size, Config.n_cell_dim], name='previous_state_c') + previous_state_h = tf.placeholder(tf.float32, [batch_size, Config.n_cell_dim], name='previous_state_h') previous_state = tf.contrib.rnn.LSTMStateTuple(previous_state_c, previous_state_h) + no_dropout = [0.0] * 6 + logits, layers = BiRNN(batch_x=input_tensor, seq_length=seq_length if FLAGS.use_seq_length else None, dropout=no_dropout, @@ -1808,7 +695,7 @@ def create_inference_graph(batch_size=1, n_steps=16, use_new_decoder=False, tfli # Initial zero state if not tflite: - zero_state = tf.zeros([batch_size, n_cell_dim], tf.float32) + zero_state = tf.zeros([batch_size, Config.n_cell_dim], tf.float32) initialize_c = tf.assign(previous_state_c, zero_state) initialize_h = tf.assign(previous_state_h, zero_state) initialize_state = tf.group(initialize_c, initialize_h, name='initialize_state') @@ -1855,7 +742,7 @@ def export(): from tensorflow.python.framework.ops import Tensor, Operation tf.reset_default_graph() - session = tf.Session(config=session_config) + session = tf.Session(config=Config.session_config) inputs, outputs, _ = create_inference_graph(batch_size=1, n_steps=FLAGS.n_steps, tflite=FLAGS.export_tflite) input_names = ",".join(tensor.op.name for tensor in inputs.values()) @@ -1948,15 +835,15 @@ def __init__(self): log_error(str(e)) def do_single_file_inference(input_file_path): - with tf.Session(config=session_config) as session: - inputs, outputs, _ = create_inference_graph(batch_size=1, use_new_decoder=True) + with tf.Session(config=Config.session_config) as session: + inputs, outputs, _ = create_inference_graph(batch_size=1, n_steps=-1) # Create a saver using variables from the above newly created graph mapping = {v.op.name: v for v in tf.global_variables() if not v.op.name.startswith('previous_state_')} saver = tf.train.Saver(mapping) # Restore variables from training checkpoint - # TODO: This restores the most recent checkpoint, but if we use validation to counterract + # TODO: This restores the most recent checkpoint, but if we use validation to counteract # over-fitting, we may want to restore an earlier checkpoint. checkpoint = tf.train.get_checkpoint_state(FLAGS.checkpoint_dir) if not checkpoint: @@ -1968,77 +855,70 @@ def do_single_file_inference(input_file_path): session.run(outputs['initialize_state']) - features = audiofile_to_input_vector(input_file_path, n_input, n_context) - num_strides = len(features) - (n_context * 2) + features = audiofile_to_input_vector(input_file_path, Config.n_input, Config.n_context) + num_strides = len(features) - (Config.n_context * 2) # Create a view into the array with overlapping strides of size # numcontext (past) + 1 (present) + numcontext (future) - window_size = 2*n_context+1 + window_size = 2*Config.n_context+1 features = np.lib.stride_tricks.as_strided( features, - (num_strides, window_size, n_input), + (num_strides, window_size, Config.n_input), (features.strides[0], features.strides[0], features.strides[1]), writeable=False) - logits = np.empty([0, 1, alphabet.size()+1]) - for i in range(0, len(features), FLAGS.n_steps): - chunk = features[i:i+FLAGS.n_steps] - - # pad with zeros if not enough steps (len(features) % FLAGS.n_steps != 0) - if len(chunk) < FLAGS.n_steps: - chunk = np.pad(chunk, - ( - (0, FLAGS.n_steps - len(chunk)), - (0, 0), - (0, 0) - ), - mode='constant', - constant_values=0) + logits = session.run(outputs['outputs'], feed_dict = { + inputs['input']: [features], + inputs['input_lengths']: [num_strides], + }) - output = session.run(outputs['outputs'], feed_dict = { - inputs['input']: [chunk], - inputs['input_lengths']: [len(chunk)], - }) - logits = np.concatenate((logits, output)) + logits = np.squeeze(logits) - decoded, _ = decode_with_lm(logits, [len(logits)], merge_repeated=False, beam_width=FLAGS.beam_width) - output = session.run(decoded) + scorer = Scorer(FLAGS.lm_alpha, FLAGS.lm_beta, + FLAGS.lm_binary_path, FLAGS.lm_trie_path, + Config.alphabet) + decoded = ctc_beam_search_decoder(logits, Config.alphabet, FLAGS.beam_width, scorer=scorer) + # Print highest probability result + print(decoded[0][1]) - text = sparse_tensor_value_to_texts(output[0], alphabet) - - print(text[0]) - - -def main(_) : +def main(_): initialize_globals() if FLAGS.train or FLAGS.test: if len(FLAGS.worker_hosts) == 0: # Only one local task: this process (default case - no cluster) - train() + with tf.Graph().as_default(): + train() + # Now do a final test epoch + if FLAGS.test: + with tf.Graph().as_default(): + test() log_debug('Done.') else: # Create and start a server for the local task. - server = tf.train.Server(cluster, job_name=FLAGS.job_name, task_index=FLAGS.task_index) + server = tf.train.Server(Config.cluster, job_name=FLAGS.job_name, task_index=FLAGS.task_index) if FLAGS.job_name == 'ps': # We are a parameter server and therefore we just wait for all workers to finish # by waiting for their stop tokens. with tf.Session(server.target) as session: for worker in FLAGS.worker_hosts: log_debug('Waiting for stop token...') - token = session.run(done_dequeues[FLAGS.task_index]) + token = session.run(Config.done_dequeues[FLAGS.task_index]) if token < 0: log_debug('Got a kill switch token from worker %i.' % abs(token + 1)) break log_debug('Got a stop token from worker %i.' % token) log_debug('Session closed.') + + if FLAGS.test: + test() elif FLAGS.job_name == 'worker': # We are a worker and therefore we have to do some work. # Assigns ops to the local worker by default. with tf.device(tf.train.replica_device_setter( - worker_device=worker_device, - cluster=cluster)): + worker_device=Config.worker_device, + cluster=Config.cluster)): # Do the training train(server) @@ -2046,7 +926,7 @@ def main(_) : log_debug('Server stopped.') # Are we the main process? - if is_chief: + if Config.is_chief: # Doing solo/post-processing work just on the main process... # Exporting the model if FLAGS.export_dir: @@ -2055,9 +935,6 @@ def main(_) : if len(FLAGS.one_shot_infer): do_single_file_inference(FLAGS.one_shot_infer) - # Stopping the coordinator - COORD.stop() - if __name__ == '__main__' : create_flags() tf.app.run(main) diff --git a/Dockerfile b/Dockerfile index 25425b10fb..9428268990 100644 --- a/Dockerfile +++ b/Dockerfile @@ -165,9 +165,6 @@ RUN ./configure # passing LD_LIBRARY_PATH is required cause Bazel doesn't pickup it from environment -# Build LM Prefix Decoder, CPU only - no need for CUDA flag -RUN bazel build -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-mtune=generic --copt=-march=x86-64 --copt=-msse --copt=-msse2 --copt=-msse3 --copt=-msse4.1 --copt=-msse4.2 --copt=-mavx //native_client:libctc_decoder_with_kenlm.so --verbose_failures --action_env=LD_LIBRARY_PATH=${LD_LIBRARY_PATH} - # Build DeepSpeech RUN bazel build --config=monolithic --config=cuda -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-mtune=generic --copt=-march=x86-64 --copt=-msse --copt=-msse2 --copt=-msse3 --copt=-msse4.1 --copt=-msse4.2 --copt=-mavx --copt=-fvisibility=hidden //native_client:libdeepspeech.so //native_client:generate_trie --verbose_failures --action_env=LD_LIBRARY_PATH=${LD_LIBRARY_PATH} @@ -184,8 +181,7 @@ RUN bazel build --config=monolithic --config=cuda -c opt --copt=-O3 --copt="-D_G # RUN pip install /tmp/tensorflow_pkg/*.whl # Copy built libs to /DeepSpeech/native_client -RUN cp /tensorflow/bazel-bin/native_client/libctc_decoder_with_kenlm.so /DeepSpeech/native_client/ \ - && cp /tensorflow/bazel-bin/native_client/generate_trie /DeepSpeech/native_client/ \ +RUN cp /tensorflow/bazel-bin/native_client/generate_trie /DeepSpeech/native_client/ \ && cp /tensorflow/bazel-bin/native_client/libdeepspeech.so /DeepSpeech/native_client/ # Install TensorFlow @@ -200,6 +196,9 @@ RUN make deepspeech WORKDIR /DeepSpeech/native_client/python RUN make bindings RUN pip install dist/deepspeech* +WORKDIR /DeepSpeech/native_client/ctcdecode +RUN make +RUN pip install dist/*.whl # << END Build and bind diff --git a/README.md b/README.md index e10dd09496..b9403b7a9e 100644 --- a/README.md +++ b/README.md @@ -213,13 +213,13 @@ cd DeepSpeech pip3 install -r requirements.txt ``` -You'll also need to download `native_client.tar.xz` or build the native client files yourself to get the custom TensorFlow OP needed for decoding the outputs of the neural network. You can use `util/taskcluster.py` to download the files for your architecture: +You'll also need to install the `ds_ctcdecoder` Python package which is required for decoding the outputs of the acoustic model into text. We have binaries available in our CI infrastructure, you can use `util/taskcluster.py` to get a URL to the decoder package. When you pass the `--decoder` option, the script will print the URL to the appropriate decoder package for your platform and Python version: ```bash -python3 util/taskcluster.py --target . +pip3 install $(python3 util/taskcluster.py --decoder) ``` -This will download the native client files for the x86_64 architecture without CUDA support, and extract them into the current folder. If you prefer building the binaries from source, see the [native_client README file](native_client/README.md). We also have binaries with CUDA enabled ("--arch gpu") and for ARM7 ("--arch arm"). +This command will download and install the `ds_ctcdecoder` package. If you prefer building the binaries from source, see the [native_client README file](native_client/README.md). You can override the platform with `--arch` if you want the package for ARM7 (`--arch arm`) or ARM64 (`--arch arm64`). ### Recommendations diff --git a/bin/run-tc-ldc93s1_checkpoint.sh b/bin/run-tc-ldc93s1_checkpoint.sh index 6ebb597dad..e89043e1e1 100755 --- a/bin/run-tc-ldc93s1_checkpoint.sh +++ b/bin/run-tc-ldc93s1_checkpoint.sh @@ -19,7 +19,6 @@ python -u DeepSpeech.py --noshow_progressbar \ --n_hidden 494 --epoch -1 --random_seed 4567 --default_stddev 0.046875 \ --max_to_keep 1 --checkpoint_dir '/tmp/ckpt' \ --learning_rate 0.001 --dropout_rate 0.05 \ - --decoder_library_path '/tmp/ds/libctc_decoder_with_kenlm.so' \ --lm_binary_path 'data/smoke_test/vocab.pruned.lm' \ --lm_trie_path 'data/smoke_test/vocab.trie' | tee /tmp/resume.log diff --git a/bin/run-tc-ldc93s1_new.sh b/bin/run-tc-ldc93s1_new.sh index a5d12cb98c..75d0a6aa5e 100755 --- a/bin/run-tc-ldc93s1_new.sh +++ b/bin/run-tc-ldc93s1_new.sh @@ -20,6 +20,5 @@ python -u DeepSpeech.py \ --default_stddev 0.046875 --max_to_keep 1 \ --checkpoint_dir '/tmp/ckpt' \ --learning_rate 0.001 --dropout_rate 0.05 --export_dir '/tmp/train' \ - --decoder_library_path '/tmp/ds/libctc_decoder_with_kenlm.so' \ --lm_binary_path 'data/smoke_test/vocab.pruned.lm' \ --lm_trie_path 'data/smoke_test/vocab.trie' \ diff --git a/bin/run-tc-ldc93s1_singleshotinference.sh b/bin/run-tc-ldc93s1_singleshotinference.sh index 40c8146132..14f30d75dc 100755 --- a/bin/run-tc-ldc93s1_singleshotinference.sh +++ b/bin/run-tc-ldc93s1_singleshotinference.sh @@ -17,7 +17,6 @@ python -u DeepSpeech.py \ --n_hidden 494 --epoch 1 --random_seed 4567 --default_stddev 0.046875 \ --max_to_keep 1 --checkpoint_dir '/tmp/ckpt' --checkpoint_secs 0 \ --learning_rate 0.001 --dropout_rate 0.05 \ - --decoder_library_path '/tmp/ds/libctc_decoder_with_kenlm.so' \ --lm_binary_path 'data/smoke_test/vocab.pruned.lm' \ --lm_trie_path 'data/smoke_test/vocab.trie' @@ -28,7 +27,6 @@ python -u DeepSpeech.py \ --n_hidden 494 --epoch 1 --random_seed 4567 --default_stddev 0.046875 \ --max_to_keep 1 --checkpoint_dir '/tmp/ckpt' --checkpoint_secs 0 \ --learning_rate 0.001 --dropout_rate 0.05 \ - --decoder_library_path '/tmp/ds/libctc_decoder_with_kenlm.so' \ --lm_binary_path 'data/smoke_test/vocab.pruned.lm' \ --lm_trie_path 'data/smoke_test/vocab.trie' \ --one_shot_infer 'data/smoke_test/LDC93S1.wav' diff --git a/bin/run-tc-ldc93s1_tflite.sh b/bin/run-tc-ldc93s1_tflite.sh index df36d99bc5..6a2d96329b 100755 --- a/bin/run-tc-ldc93s1_tflite.sh +++ b/bin/run-tc-ldc93s1_tflite.sh @@ -14,7 +14,6 @@ python -u DeepSpeech.py \ --n_hidden 494 \ --checkpoint_dir '/tmp/ckpt' \ --export_dir '/tmp/train' \ - --decoder_library_path '/tmp/ds/libctc_decoder_with_kenlm.so' \ --lm_binary_path 'data/smoke_test/vocab.pruned.lm' \ --lm_trie_path 'data/smoke_test/vocab.trie' \ --notrain --notest \ diff --git a/data/lm/trie b/data/lm/trie index ecd8ca58d9..a937a2267f 100644 --- a/data/lm/trie +++ b/data/lm/trie @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bd1fe266b555d5108237bf753a7a001c043b839c7ca538d0096705c4084a7516 -size 276246136 +oid sha256:a5324f06b27c7b4ef88dd2c8bc3d05d4c718db219c2e007f59061a30c9ac7afa +size 21627983 diff --git a/data/lm/trie.ctcdecode b/data/lm/trie.ctcdecode deleted file mode 100644 index a937a2267f..0000000000 --- a/data/lm/trie.ctcdecode +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a5324f06b27c7b4ef88dd2c8bc3d05d4c718db219c2e007f59061a30c9ac7afa -size 21627983 diff --git a/data/lm/vocab.txt b/data/lm/vocab.txt deleted file mode 100644 index ff0be83a94..0000000000 --- a/data/lm/vocab.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:47b897b4c685c8067d207674452b0eb2fd08fdd641121f16091a8ee8c85819bf -size 8957635 diff --git a/data/smoke_test/vocab.trie b/data/smoke_test/vocab.trie index a4c7a4003b..3a5d637ff2 100644 Binary files a/data/smoke_test/vocab.trie and b/data/smoke_test/vocab.trie differ diff --git a/data/smoke_test/vocab.trie.ctcdecode b/data/smoke_test/vocab.trie.ctcdecode deleted file mode 100644 index 3a5d637ff2..0000000000 Binary files a/data/smoke_test/vocab.trie.ctcdecode and /dev/null differ diff --git a/evaluate.py b/evaluate.py index 59c5b2e8d5..1f0fe2913b 100755 --- a/evaluate.py +++ b/evaluate.py @@ -15,18 +15,14 @@ from attrdict import AttrDict from collections import namedtuple from ds_ctcdecoder import ctc_beam_search_decoder_batch, Scorer -from DeepSpeech import initialize_globals, create_flags, log_debug, log_info, log_warn, log_error, create_inference_graph -from multiprocessing import Pool +from multiprocessing import Pool, cpu_count from six.moves import zip, range from util.audio import audiofile_to_input_vector -from util.text import Alphabet, ctc_label_dense_to_sparse, wer, levenshtein +from util.config import Config, initialize_globals +from util.flags import create_flags, FLAGS +from util.logging import log_error from util.preprocess import pmap, preprocess - - -FLAGS = tf.app.flags.FLAGS - -N_FEATURES = 26 -N_CONTEXT = 9 +from util.text import Alphabet, ctc_label_dense_to_sparse, wer, levenshtein def split_data(dataset, batch_size): @@ -86,41 +82,21 @@ def calculate_report(labels, decodings, distances, losses): return samples_wer, samples -def main(_): - initialize_globals() - - if not FLAGS.test_files: - log_error('You need to specify what files to use for evaluation via ' - 'the --test_files flag.') - exit(1) - - global alphabet - alphabet = Alphabet(FLAGS.alphabet_config_path) - - scorer = Scorer(FLAGS.lm_weight, FLAGS.valid_word_count_weight, +def evaluate(test_data, inference_graph, alphabet): + scorer = Scorer(FLAGS.lm_alpha, FLAGS.lm_beta, FLAGS.lm_binary_path, FLAGS.lm_trie_path, - alphabet) + Config.alphabet) - # sort examples by length, improves packing of batches and timesteps - test_data = preprocess( - FLAGS.test_files.split(','), - FLAGS.test_batch_size, - alphabet=alphabet, - numcep=N_FEATURES, - numcontext=N_CONTEXT, - hdf5_cache_path=FLAGS.hdf5_test_set).sort_values( - by="features_len", - ascending=False) def create_windows(features): - num_strides = len(features) - (N_CONTEXT * 2) + num_strides = len(features) - (Config.n_context * 2) # Create a view into the array with overlapping strides of size # numcontext (past) + 1 (present) + numcontext (future) - window_size = 2*N_CONTEXT+1 + window_size = 2*Config.n_context+1 features = np.lib.stride_tricks.as_strided( features, - (num_strides, window_size, N_FEATURES), + (num_strides, window_size, Config.n_input), (features.strides[0], features.strides[0], features.strides[1]), writeable=False) @@ -129,8 +105,8 @@ def create_windows(features): # Create overlapping windows over the features test_data['features'] = test_data['features'].apply(create_windows) - with tf.Session() as session: - inputs, outputs, layers = create_inference_graph(batch_size=FLAGS.test_batch_size, n_steps=-1) + with tf.Session(config=Config.session_config) as session: + inputs, outputs, layers = inference_graph # Transpose to batch major for decoder transposed = tf.transpose(outputs['outputs'], [1, 0, 2]) @@ -183,26 +159,29 @@ def create_windows(features): logitses.append(logits) losses.extend(loss) - ground_truths = [] - predictions = [] - distances = [] + ground_truths = [] + predictions = [] - print('Decoding predictions...') - bar = progressbar.ProgressBar(max_value=batch_count, - widget=progressbar.AdaptiveETA) + print('Decoding predictions...') + bar = progressbar.ProgressBar(max_value=batch_count, + widget=progressbar.AdaptiveETA) - # Get number of accessible CPU cores for this process - num_processes = len(os.sched_getaffinity(0)) + # Get number of accessible CPU cores for this process + try: + num_processes = cpu_count() + except: + num_processes = 1 - # Second pass, decode logits and compute WER and edit distance metrics - for logits, batch in bar(zip(logitses, split_data(test_data, FLAGS.test_batch_size))): - seq_lengths = batch['features_len'].values.astype(np.int32) - decoded = ctc_beam_search_decoder_batch(logits, seq_lengths, alphabet, FLAGS.beam_width, - num_processes=num_processes, scorer=scorer) + # Second pass, decode logits and compute WER and edit distance metrics + for logits, batch in bar(zip(logitses, split_data(test_data, FLAGS.test_batch_size))): + seq_lengths = batch['features_len'].values.astype(np.int32) + decoded = ctc_beam_search_decoder_batch(logits, seq_lengths, alphabet, FLAGS.beam_width, + num_processes=num_processes, scorer=scorer) - ground_truths.extend(alphabet.decode(l) for l in batch['transcript']) - predictions.extend(d[0][1] for d in decoded) - distances.extend(levenshtein(a, b) for a, b in zip(labels, predictions)) + ground_truths.extend(alphabet.decode(l) for l in batch['transcript']) + predictions.extend(d[0][1] for d in decoded) + + distances = [levenshtein(a, b) for a, b in zip(ground_truths, predictions)] wer, samples = calculate_report(ground_truths, predictions, distances, losses) mean_edit_distance = np.mean(distances) @@ -211,17 +190,48 @@ def create_windows(features): # Take only the first report_count items report_samples = itertools.islice(samples, FLAGS.report_count) - print('Test - WER: %f, loss: %f, mean edit distance: %f' % - (wer, mean_loss, mean_edit_distance)) + print('Test - WER: %f, CER: %f, loss: %f' % + (wer, mean_edit_distance, mean_loss)) print('-' * 80) for sample in report_samples: - print('WER: %f, loss: %f, edit distance: %f' % - (sample.wer, sample.loss, sample.distance)) + print('WER: %f, CER: %f, loss: %f' % + (sample.wer, sample.distance, sample.loss)) print(' - src: "%s"' % sample.src) print(' - res: "%s"' % sample.res) print('-' * 80) + return samples + + +def main(_): + initialize_globals() + + if not FLAGS.test_files: + log_error('You need to specify what files to use for evaluation via ' + 'the --test_files flag.') + exit(1) + + global alphabet + alphabet = Alphabet(FLAGS.alphabet_config_path) + + # sort examples by length, improves packing of batches and timesteps + test_data = preprocess( + FLAGS.test_files.split(','), + FLAGS.test_batch_size, + alphabet=alphabet, + numcep=Config.n_input, + numcontext=Config.n_context, + hdf5_cache_path=FLAGS.hdf5_test_set).sort_values( + by="features_len", + ascending=False) + + from DeepSpeech import create_inference_graph + graph = create_inference_graph(batch_size=FLAGS.test_batch_size, n_steps=-1) + + samples = evaluate(test_data, graph, alphabet) + if FLAGS.test_output_file: + # Save decoded tuples as JSON, converting NumPy floats to Python floats json.dump(samples, open(FLAGS.test_output_file, 'w'), default=lambda x: float(x)) diff --git a/native_client/BUILD b/native_client/BUILD index 5e21240657..c86a3237a8 100644 --- a/native_client/BUILD +++ b/native_client/BUILD @@ -12,11 +12,10 @@ genrule( KENLM_SOURCES = glob(["kenlm/lm/*.cc", "kenlm/util/*.cc", "kenlm/util/double-conversion/*.cc", "kenlm/lm/*.hh", "kenlm/util/*.hh", "kenlm/util/double-conversion/*.h"], - exclude = ["kenlm/*/*test.cc", "kenlm/*/*main.cc"]) + glob(["boost_locale/**/*.hpp"]) + exclude = ["kenlm/*/*test.cc", "kenlm/*/*main.cc"]) KENLM_INCLUDES = [ "kenlm", - "boost_locale" ] DECODER_SOURCES = glob([ @@ -102,24 +101,6 @@ tf_cc_shared_object( defines = ["KENLM_MAX_ORDER=6"], ) -tf_cc_shared_object( - name = "libctc_decoder_with_kenlm.so", - srcs = [ - "beam_search.cc", - "beam_search.h", - "alphabet.h", - "trie_node.h" - ] + - KENLM_SOURCES, - includes = KENLM_INCLUDES, - copts = ["-std=c++11"], - defines = ["KENLM_MAX_ORDER=6"], - deps = ["//tensorflow/core:framework_headers_lib", - "//tensorflow/core/util/ctc", - "//third_party/eigen3", - ], -) - cc_binary( name = "generate_trie", srcs = [ diff --git a/native_client/README.md b/native_client/README.md index 8ec39ea4d7..5bef4ef12c 100644 --- a/native_client/README.md +++ b/native_client/README.md @@ -19,8 +19,6 @@ This will download and extract `native_client.tar.xz` which includes the deepspe If you want the CUDA capable version of the binaries, use `--arch gpu`. Note that for now we don't publish CUDA-capable macOS binaries. -If you're looking to train a model, you now have a `libctc_decoder_with_kenlm.so` file that you can pass to the `--decoder_library_path` parameter of `DeepSpeech.py`. - ## Required Dependencies Running inference might require some runtime dependencies to be already installed on your system. Those should be the same, whatever the bindings you are using: @@ -57,7 +55,7 @@ If you'd like to build the binaries yourself, you'll need the following pre-requ It is required to use our fork of TensorFlow since it includes fixes for common problems encountered when building the native client files. -If you'd like to build the language bindings, you'll also need: +If you'd like to build the language bindings or the decoder package, you'll also need: * [SWIG](http://www.swig.org/) * [node-pre-gyp](https://github.com/mapbox/node-pre-gyp) (for Node.JS bindings only) @@ -77,10 +75,9 @@ Before building the DeepSpeech client libraries, you will need to prepare your e Preferably, checkout the version of tensorflow which is currently supported by DeepSpeech (see requirements.txt), and use the bazel version recommended by TensorFlow for that version. Then, follow the [instructions](https://www.tensorflow.org/install/install_sources) on the TensorFlow site for your platform, up to the end of 'Configure the installation'. -After that, you can build the Tensorflow and DeepSpeech libraries using the following commands. Please note that the flags for `libctc_decoder_with_kenlm.so` differs a little bit. +After that, you can build the Tensorflow and DeepSpeech libraries using the following command. ``` -bazel build -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" //native_client:libctc_decoder_with_kenlm.so bazel build --config=monolithic -c opt --copt=-O3 --copt="-D_GLIBCXX_USE_CXX11_ABI=0" --copt=-fvisibility=hidden //native_client:libdeepspeech.so //native_client:generate_trie ``` @@ -118,7 +115,7 @@ Included are a set of generated Python bindings. After following the above build ``` cd native_client/python make bindings -sudo pip install dist/deepspeech* +pip install dist/deepspeech* ``` The API mirrors the C++ API and is demonstrated in [client.py](python/client.py). Refer to [deepspeech.h](deepspeech.h) for documentation. @@ -134,3 +131,13 @@ make npm-pack ``` This will create the package `deepspeech-0.3.0.tgz` in `native_client/javascript`. + +## Building the CTC decoder package + +To build the `ds_ctcdecoder` package, you'll need the general requirements listed above (in particular SWIG). The command below builds the bindings using 8 processes for compilation. Adjust the parameter accordingly for more or less parallelism. + +``` +cd native_client/ctcdecode +make bindings NUM_PROCESSES=8 +pip install dist/*.whl +``` diff --git a/native_client/beam_search.cc b/native_client/beam_search.cc deleted file mode 100644 index 9cc5c304d1..0000000000 --- a/native_client/beam_search.cc +++ /dev/null @@ -1,361 +0,0 @@ -/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#include -#include -#include - -#include "beam_search.h" - -#include "tensorflow/core/framework/op.h" -#include "tensorflow/core/framework/op_kernel.h" -#include "tensorflow/core/framework/shape_inference.h" -#include "tensorflow/core/kernels/bounds_check.h" - -namespace tf = tensorflow; -using tf::shape_inference::DimensionHandle; -using tf::shape_inference::InferenceContext; -using tf::shape_inference::ShapeHandle; - -REGISTER_OP("CTCBeamSearchDecoderWithLM") - .Input("inputs: float") - .Input("sequence_length: int32") - .Attr("model_path: string") - .Attr("trie_path: string") - .Attr("alphabet_path: string") - .Attr("lm_weight: float") - .Attr("valid_word_count_weight: float") - .Attr("beam_width: int >= 1 = 100") - .Attr("top_paths: int >= 1 = 1") - .Attr("merge_repeated: bool = true") - .Output("decoded_indices: top_paths * int64") - .Output("decoded_values: top_paths * int64") - .Output("decoded_shape: top_paths * int64") - .Output("log_probability: float") - .SetShapeFn([](InferenceContext *c) { - ShapeHandle inputs; - ShapeHandle sequence_length; - - TF_RETURN_IF_ERROR(c->WithRank(c->input(0), 3, &inputs)); - TF_RETURN_IF_ERROR(c->WithRank(c->input(1), 1, &sequence_length)); - - // Get batch size from inputs and sequence_length. - DimensionHandle batch_size; - TF_RETURN_IF_ERROR( - c->Merge(c->Dim(inputs, 1), c->Dim(sequence_length, 0), &batch_size)); - - tf::int32 top_paths; - TF_RETURN_IF_ERROR(c->GetAttr("top_paths", &top_paths)); - - // Outputs. - int out_idx = 0; - for (int i = 0; i < top_paths; ++i) { // decoded_indices - c->set_output(out_idx++, c->Matrix(InferenceContext::kUnknownDim, 2)); - } - for (int i = 0; i < top_paths; ++i) { // decoded_values - c->set_output(out_idx++, c->Vector(InferenceContext::kUnknownDim)); - } - ShapeHandle shape_v = c->Vector(2); - for (int i = 0; i < top_paths; ++i) { // decoded_shape - c->set_output(out_idx++, shape_v); - } - c->set_output(out_idx++, c->Matrix(batch_size, top_paths)); - return tf::Status::OK(); - }) - .Doc(R"doc( -Performs beam search decoding on the logits given in input. - -A note about the attribute merge_repeated: For the beam search decoder, -this means that if consecutive entries in a beam are the same, only -the first of these is emitted. That is, when the top path is "A B B B B", -"A B" is returned if merge_repeated = True but "A B B B B" is -returned if merge_repeated = False. - -inputs: 3-D, shape: `(max_time x batch_size x num_classes)`, the logits. -sequence_length: A vector containing sequence lengths, size `(batch)`. -model_path: A string containing the path to the KenLM model file to use. -trie_path: A string containing the path to the trie file built from the vocabulary. -alphabet_path: A string containing the path to the alphabet file (see alphabet.h). -lm_weight: alpha hyperparameter of CTC decoder. LM weight. -valid_word_count_weight: beta' hyperparameter of CTC decoder. Valid word insertion weight. -beam_width: A scalar >= 0 (beam search beam width). -top_paths: A scalar >= 0, <= beam_width (controls output size). -merge_repeated: If true, merge repeated classes in output. -decoded_indices: A list (length: top_paths) of indices matrices. Matrix j, - size `(total_decoded_outputs[j] x 2)`, has indices of a - `SparseTensor`. The rows store: [batch, time]. -decoded_values: A list (length: top_paths) of values vectors. Vector j, - size `(length total_decoded_outputs[j])`, has the values of a - `SparseTensor`. The vector stores the decoded classes for beam j. -decoded_shape: A list (length: top_paths) of shape vector. Vector j, - size `(2)`, stores the shape of the decoded `SparseTensor[j]`. - Its values are: `[batch_size, max_decoded_length[j]]`. -log_probability: A matrix, shaped: `(batch_size x top_paths)`. The - sequence log-probabilities. -)doc"); - -class CTCDecodeHelper { - public: - CTCDecodeHelper() : top_paths_(1) {} - - inline int GetTopPaths() const { return top_paths_; } - void SetTopPaths(int tp) { top_paths_ = tp; } - - tf::Status ValidateInputsGenerateOutputs( - tf::OpKernelContext *ctx, const tf::Tensor **inputs, const tf::Tensor **seq_len, - std::string *model_path, std::string *trie_path, std::string *alphabet_path, - tf::Tensor **log_prob, tf::OpOutputList *decoded_indices, - tf::OpOutputList *decoded_values, tf::OpOutputList *decoded_shape) const { - tf::Status status = ctx->input("inputs", inputs); - if (!status.ok()) return status; - status = ctx->input("sequence_length", seq_len); - if (!status.ok()) return status; - - const tf::TensorShape &inputs_shape = (*inputs)->shape(); - - if (inputs_shape.dims() != 3) { - return tf::errors::InvalidArgument("inputs is not a 3-Tensor"); - } - - const tf::int64 max_time = inputs_shape.dim_size(0); - const tf::int64 batch_size = inputs_shape.dim_size(1); - - if (max_time == 0) { - return tf::errors::InvalidArgument("max_time is 0"); - } - if (!tf::TensorShapeUtils::IsVector((*seq_len)->shape())) { - return tf::errors::InvalidArgument("sequence_length is not a vector"); - } - - if (!(batch_size == (*seq_len)->dim_size(0))) { - return tf::errors::FailedPrecondition( - "len(sequence_length) != batch_size. ", "len(sequence_length): ", - (*seq_len)->dim_size(0), " batch_size: ", batch_size); - } - - auto seq_len_t = (*seq_len)->vec(); - - for (int b = 0; b < batch_size; ++b) { - if (!(seq_len_t(b) <= max_time)) { - return tf::errors::FailedPrecondition("sequence_length(", b, ") <= ", - max_time); - } - } - - tf::Status s = ctx->allocate_output( - "log_probability", tf::TensorShape({batch_size, top_paths_}), log_prob); - if (!s.ok()) return s; - - s = ctx->output_list("decoded_indices", decoded_indices); - if (!s.ok()) return s; - s = ctx->output_list("decoded_values", decoded_values); - if (!s.ok()) return s; - s = ctx->output_list("decoded_shape", decoded_shape); - if (!s.ok()) return s; - - return tf::Status::OK(); - } - - // sequences[b][p][ix] stores decoded value "ix" of path "p" for batch "b". - tf::Status StoreAllDecodedSequences( - const std::vector>> &sequences, - tf::OpOutputList *decoded_indices, tf::OpOutputList *decoded_values, - tf::OpOutputList *decoded_shape) const { - // Calculate the total number of entries for each path - const tf::int64 batch_size = sequences.size(); - std::vector num_entries(top_paths_, 0); - - // Calculate num_entries per path - for (const auto &batch_s : sequences) { - CHECK_EQ(batch_s.size(), top_paths_); - for (int p = 0; p < top_paths_; ++p) { - num_entries[p] += batch_s[p].size(); - } - } - - for (int p = 0; p < top_paths_; ++p) { - tf::Tensor *p_indices = nullptr; - tf::Tensor *p_values = nullptr; - tf::Tensor *p_shape = nullptr; - - const tf::int64 p_num = num_entries[p]; - - tf::Status s = - decoded_indices->allocate(p, tf::TensorShape({p_num, 2}), &p_indices); - if (!s.ok()) return s; - s = decoded_values->allocate(p, tf::TensorShape({p_num}), &p_values); - if (!s.ok()) return s; - s = decoded_shape->allocate(p, tf::TensorShape({2}), &p_shape); - if (!s.ok()) return s; - - auto indices_t = p_indices->matrix(); - auto values_t = p_values->vec(); - auto shape_t = p_shape->vec(); - - tf::int64 max_decoded = 0; - tf::int64 offset = 0; - - for (tf::int64 b = 0; b < batch_size; ++b) { - auto &p_batch = sequences[b][p]; - tf::int64 num_decoded = p_batch.size(); - max_decoded = std::max(max_decoded, num_decoded); - std::copy_n(p_batch.begin(), num_decoded, &values_t(offset)); - for (tf::int64 t = 0; t < num_decoded; ++t, ++offset) { - indices_t(offset, 0) = b; - indices_t(offset, 1) = t; - } - } - - shape_t(0) = batch_size; - shape_t(1) = max_decoded; - } - return tf::Status::OK(); - } - - private: - int top_paths_; - TF_DISALLOW_COPY_AND_ASSIGN(CTCDecodeHelper); -}; - -class CTCBeamSearchDecoderWithLMOp : public tf::OpKernel { - public: - explicit CTCBeamSearchDecoderWithLMOp(tf::OpKernelConstruction *ctx) - : tf::OpKernel(ctx) - , beam_scorer_(GetModelPath(ctx), - GetTriePath(ctx), - GetAlphabetPath(ctx), - GetLMWeight(ctx), - GetValidWordCountWeight(ctx)) - { - OP_REQUIRES_OK(ctx, ctx->GetAttr("merge_repeated", &merge_repeated_)); - OP_REQUIRES_OK(ctx, ctx->GetAttr("beam_width", &beam_width_)); - int top_paths; - OP_REQUIRES_OK(ctx, ctx->GetAttr("top_paths", &top_paths)); - decode_helper_.SetTopPaths(top_paths); - } - - void Compute(tf::OpKernelContext *ctx) override { - const tf::Tensor *inputs; - const tf::Tensor *seq_len; - std::string model_path; - std::string trie_path; - std::string alphabet_path; - tf::Tensor *log_prob = nullptr; - tf::OpOutputList decoded_indices; - tf::OpOutputList decoded_values; - tf::OpOutputList decoded_shape; - OP_REQUIRES_OK(ctx, decode_helper_.ValidateInputsGenerateOutputs( - ctx, &inputs, &seq_len, &model_path, &trie_path, - &alphabet_path, &log_prob, &decoded_indices, - &decoded_values, &decoded_shape)); - - auto inputs_t = inputs->tensor(); - auto seq_len_t = seq_len->vec(); - auto log_prob_t = log_prob->matrix(); - - const tf::TensorShape &inputs_shape = inputs->shape(); - - const tf::int64 max_time = inputs_shape.dim_size(0); - const tf::int64 batch_size = inputs_shape.dim_size(1); - const tf::int64 num_classes_raw = inputs_shape.dim_size(2); - OP_REQUIRES( - ctx, tf::FastBoundsCheck(num_classes_raw, std::numeric_limits::max()), - tf::errors::InvalidArgument("num_classes cannot exceed max int")); - const int num_classes = static_cast(num_classes_raw); - - log_prob_t.setZero(); - - std::vector::UnalignedConstMatrix> input_list_t; - - for (std::size_t t = 0; t < max_time; ++t) { - input_list_t.emplace_back(inputs_t.data() + t * batch_size * num_classes, - batch_size, num_classes); - } - - tf::ctc::CTCBeamSearchDecoder beam_search(num_classes, beam_width_, - &beam_scorer_, 1 /* batch_size */, - merge_repeated_); - tf::Tensor input_chip(tf::DT_FLOAT, tf::TensorShape({num_classes})); - auto input_chip_t = input_chip.flat(); - - std::vector>> best_paths(batch_size); - std::vector log_probs; - - // Assumption: the blank index is num_classes - 1 - for (int b = 0; b < batch_size; ++b) { - auto &best_paths_b = best_paths[b]; - best_paths_b.resize(decode_helper_.GetTopPaths()); - for (int t = 0; t < seq_len_t(b); ++t) { - input_chip_t = input_list_t[t].chip(b, 0); - auto input_bi = - Eigen::Map(input_chip_t.data(), num_classes); - beam_search.Step(input_bi); - } - OP_REQUIRES_OK( - ctx, beam_search.TopPaths(decode_helper_.GetTopPaths(), &best_paths_b, - &log_probs, merge_repeated_)); - - beam_search.Reset(); - - for (int bp = 0; bp < decode_helper_.GetTopPaths(); ++bp) { - log_prob_t(b, bp) = log_probs[bp]; - } - } - - OP_REQUIRES_OK(ctx, decode_helper_.StoreAllDecodedSequences( - best_paths, &decoded_indices, &decoded_values, - &decoded_shape)); - } - - private: - CTCDecodeHelper decode_helper_; - KenLMBeamScorer beam_scorer_; - bool merge_repeated_; - int beam_width_; - TF_DISALLOW_COPY_AND_ASSIGN(CTCBeamSearchDecoderWithLMOp); - - std::string GetModelPath(tf::OpKernelConstruction *ctx) { - std::string model_path; - ctx->GetAttr("model_path", &model_path); - return model_path; - } - - std::string GetTriePath(tf::OpKernelConstruction *ctx) { - std::string trie_path; - ctx->GetAttr("trie_path", &trie_path); - return trie_path; - } - - std::string GetAlphabetPath(tf::OpKernelConstruction *ctx) { - std::string alphabet_path; - ctx->GetAttr("alphabet_path", &alphabet_path); - return alphabet_path; - } - - float GetLMWeight(tf::OpKernelConstruction *ctx) { - float lm_weight; - ctx->GetAttr("lm_weight", &lm_weight); - return lm_weight; - } - - float GetValidWordCountWeight(tf::OpKernelConstruction *ctx) { - float valid_word_count_weight; - ctx->GetAttr("valid_word_count_weight", &valid_word_count_weight); - return valid_word_count_weight; - } -}; - -REGISTER_KERNEL_BUILDER(Name("CTCBeamSearchDecoderWithLM").Device(tf::DEVICE_CPU), - CTCBeamSearchDecoderWithLMOp); diff --git a/native_client/beam_search.h b/native_client/beam_search.h deleted file mode 100644 index 7720a08769..0000000000 --- a/native_client/beam_search.h +++ /dev/null @@ -1,206 +0,0 @@ -#ifndef BEAM_SEARCH_H -#define BEAM_SEARCH_H - -#include "alphabet.h" -#include "trie_node.h" - -#include "tensorflow/core/util/ctc/ctc_beam_search.h" - -#include "kenlm/lm/model.hh" - -typedef lm::ngram::QuantArrayTrieModel Model; - -struct KenLMBeamState { - float language_model_score; - float score; - float delta_score; - int num_words; - std::string incomplete_word; - TrieNode *incomplete_word_trie_node; - Model::State model_state; -}; - -class KenLMBeamScorer : public tensorflow::ctc::BaseBeamScorer { - public: - KenLMBeamScorer(const std::string &kenlm_path, const std::string &trie_path, - const std::string &alphabet_path, float lm_weight, - float valid_word_count_weight) - : model_(kenlm_path.c_str(), GetLMConfig()) - , alphabet_(alphabet_path.c_str()) - , lm_weight_(lm_weight) - , valid_word_count_weight_(valid_word_count_weight) - { - std::ifstream in(trie_path, std::ios::in | std::ios::binary); - TrieNode::ReadFromStream(in, trieRoot_, alphabet_.GetSize()); - - // low probability for OOV words - oov_score_ = -10.0; - } - - virtual ~KenLMBeamScorer() { - delete trieRoot_; - } - - // State initialization. - void InitializeState(KenLMBeamState* root) const { - root->language_model_score = 0.0f; - root->score = 0.0f; - root->delta_score = 0.0f; - root->incomplete_word.clear(); - root->num_words = 0; - root->incomplete_word_trie_node = trieRoot_; - root->model_state = model_.BeginSentenceState(); - } - // ExpandState is called when expanding a beam to one of its children. - // Called at most once per child beam. In the simplest case, no state - // expansion is done. - void ExpandState(const KenLMBeamState& from_state, int /*from_label*/, - KenLMBeamState* to_state, int to_label) const { - CopyState(from_state, to_state); - - if (!alphabet_.IsSpace(to_label)) { - to_state->incomplete_word += alphabet_.StringFromLabel(to_label); - TrieNode *trie_node = from_state.incomplete_word_trie_node; - - // If we have no valid prefix we assume a very low log probability - float min_unigram_score = oov_score_; - // If prefix does exist - if (trie_node != nullptr) { - trie_node = trie_node->GetChildAt(to_label); - to_state->incomplete_word_trie_node = trie_node; - - if (trie_node != nullptr) { - min_unigram_score = trie_node->GetMinUnigramScore(); - } - } - // TODO try two options - // 1) unigram score added up to language model scare - // 2) langugage model score of (preceding_words + unigram_word) - to_state->score = min_unigram_score + to_state->language_model_score; - to_state->delta_score = to_state->score - from_state.score; - } else { - auto word_index = WordIndex(to_state->incomplete_word); - float lm_score_delta = ScoreIncompleteWord(from_state.model_state, - word_index, - to_state->model_state); - // Give fixed word bonus - if (!IsOOV(word_index)) { - to_state->language_model_score += valid_word_count_weight_; - } - to_state->num_words += 1; - UpdateWithLMScore(to_state, lm_score_delta); - ResetIncompleteWord(to_state); - } - } - // ExpandStateEnd is called after decoding has finished. Its purpose is to - // allow a final scoring of the beam in its current state, before resorting - // and retrieving the TopN requested candidates. Called at most once per beam. - void ExpandStateEnd(KenLMBeamState* state) const { - float lm_score_delta = 0.0f; - Model::State out; - if (state->incomplete_word.size() > 0) { - lm_score_delta += ScoreIncompleteWord(state->model_state, - WordIndex(state->incomplete_word), - out); - ResetIncompleteWord(state); - state->model_state = out; - } - lm_score_delta += model_.FullScore(state->model_state, - model_.GetVocabulary().EndSentence(), - out).prob; - UpdateWithLMScore(state, lm_score_delta); - - - // This is a bit of a hack. In order to implement length normalization, we - // compute the final state score here (and not in GetStateEndExpansionScore) - // and then set the state delta score to the value that would normalize - // the state score when added to it. This way, we can normalize the internal - // scores in TensorFlow's CTC code when it adds the final state expansion - // score to this beam's score. - state->score += lm_weight_ * state->delta_score; - if (state->num_words > 0) { - float normalized_score = state->score / (float)state->num_words; - state->delta_score = normalized_score - state->score; - } - } - // GetStateExpansionScore should be an inexpensive method to retrieve the - // (cached) expansion score computed within ExpandState. The score is - // multiplied (log-addition) with the input score at the current step from - // the network. - // - // The score returned should be a log-probability. In the simplest case, as - // there's no state expansion logic, the expansion score is zero. - float GetStateExpansionScore(const KenLMBeamState& state, - float previous_score) const { - return lm_weight_ * state.delta_score + previous_score; - } - // GetStateEndExpansionScore should be an inexpensive method to retrieve the - // (cached) expansion score computed within ExpandStateEnd. The score is - // multiplied (log-addition) with the final probability of the beam. - // - // The score returned should be a log-probability. - float GetStateEndExpansionScore(const KenLMBeamState& state) const { - return state.delta_score; - } - - void SetLMWeight(float lm_weight) { - this->lm_weight_ = lm_weight; - } - - void SetValidWordCountWeight(float valid_word_count_weight) { - this->valid_word_count_weight_ = valid_word_count_weight; - } - - private: - Model model_; - Alphabet alphabet_; - TrieNode *trieRoot_; - float lm_weight_; - float valid_word_count_weight_; - float oov_score_; - - lm::ngram::Config GetLMConfig() const { - lm::ngram::Config config; - config.load_method = util::POPULATE_OR_READ; - return config; - } - - void UpdateWithLMScore(KenLMBeamState *state, float lm_score_delta) const { - float previous_score = state->score; - state->language_model_score += lm_score_delta; - state->score = state->language_model_score; - state->delta_score = state->language_model_score - previous_score; - } - - void ResetIncompleteWord(KenLMBeamState *state) const { - state->incomplete_word.clear(); - state->incomplete_word_trie_node = trieRoot_; - } - - lm::WordIndex WordIndex(const std::string& word) const { - return model_.GetVocabulary().Index(word); - } - - bool IsOOV(const lm::WordIndex& word) const { - auto &vocabulary = model_.GetVocabulary(); - return word == vocabulary.NotFound(); - } - - float ScoreIncompleteWord(const Model::State& model_state, - const lm::WordIndex& word, - Model::State& out) const { - return model_.FullScore(model_state, word, out).prob; - } - - void CopyState(const KenLMBeamState& from, KenLMBeamState* to) const { - to->language_model_score = from.language_model_score; - to->score = from.score; - to->delta_score = from.delta_score; - to->num_words = from.num_words; - to->incomplete_word = from.incomplete_word; - to->incomplete_word_trie_node = from.incomplete_word_trie_node; - to->model_state = from.model_state; - } -}; - -#endif /* BEAM_SEARCH_H */ diff --git a/native_client/boost_locale/LICENSE_1_0.txt b/native_client/boost_locale/LICENSE_1_0.txt deleted file mode 100644 index 36b7cd93cd..0000000000 --- a/native_client/boost_locale/LICENSE_1_0.txt +++ /dev/null @@ -1,23 +0,0 @@ -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/native_client/boost_locale/README.mozilla b/native_client/boost_locale/README.mozilla deleted file mode 100644 index 8d3011f551..0000000000 --- a/native_client/boost_locale/README.mozilla +++ /dev/null @@ -1,285 +0,0 @@ -This folder was created by running - - bcp boost/locale/encoding_utf.hpp boost_locale - -In a Boost 1.65.1 install. - -Licensing details: - -Boost Licence Dependency Information for boost/locale/encoding_utf.hpp - -The Boost version is: 1.65.1 - -Boost Software License, Version 1.0 - - Copyright (c) Date Author - - Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -This license is used by the following 19 copyright holders: - - Artyom Beilis - Beman Dawes - Bill Kempf - Darin Adler - David Abrahams - Dynatrace - Eric Friedman - Eric Jourdanneau - Gennaro Prota - Guillaume Melquiond - Jens Mauer - Jens Maurer - Joel Falcou - John Maddock - John maddock - Martin Wille - Nuxi - Peter Dimov - https nuxi nl - -This license applies to the following 14 files: - - boost/config/compiler/xlcpp_zos.hpp - boost/config/detail/select_compiler_config.hpp - boost/config/detail/suffix.hpp - boost/config/platform/cloudabi.hpp - boost/config/platform/zos.hpp - boost/config/stdlib/xlcpp_zos.hpp - boost/config/workaround.hpp - boost/cstdint.hpp - boost/limits.hpp - boost/locale/definitions.hpp - boost/locale/encoding_errors.hpp - boost/locale/encoding_utf.hpp - boost/locale/utf.hpp - boost/version.hpp - -Boost Software License, Version 1.0 (variant #1) - - Copyright (c) Date Author - - Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -This license is used by the following 32 copyright holders: - - Aleksey Gurtovoy - Artyom Beilis - Beman Dawes - Bill Kempf - Boris Gubenko - Brian Kuhl - Bryce Lelbach - Christof Meerwald - Christopher Jefferson - Cray Inc - Dan Watkins - Darin Adler - David Abrahams - Douglas Gregor - Dustin Spicuzza - Eric Jourdanneau - Guillaume Melquiond - Jens Maurer - Jessica Hamilton - Jim Douglas - Joel Falcou - John Maddock - Lie-Quan Lee - Markus Schoepflin - Martin Wille - Noel Belcourt - Peter Dimov - Rene Rivera - Stefan Slapeta - Synge Todo - Toon Knapen - Yuriy Krasnoschek - -This license applies to the following 71 files: - - boost/config.hpp - boost/config/abi/borland_prefix.hpp - boost/config/abi/borland_suffix.hpp - boost/config/abi/msvc_prefix.hpp - boost/config/abi/msvc_suffix.hpp - boost/config/abi_prefix.hpp - boost/config/abi_suffix.hpp - boost/config/auto_link.hpp - boost/config/compiler/borland.hpp - boost/config/compiler/clang.hpp - boost/config/compiler/codegear.hpp - boost/config/compiler/comeau.hpp - boost/config/compiler/common_edg.hpp - boost/config/compiler/compaq_cxx.hpp - boost/config/compiler/cray.hpp - boost/config/compiler/diab.hpp - boost/config/compiler/digitalmars.hpp - boost/config/compiler/gcc.hpp - boost/config/compiler/gcc_xml.hpp - boost/config/compiler/greenhills.hpp - boost/config/compiler/hp_acc.hpp - boost/config/compiler/intel.hpp - boost/config/compiler/kai.hpp - boost/config/compiler/metrowerks.hpp - boost/config/compiler/mpw.hpp - boost/config/compiler/nvcc.hpp - boost/config/compiler/pathscale.hpp - boost/config/compiler/pgi.hpp - boost/config/compiler/sgi_mipspro.hpp - boost/config/compiler/sunpro_cc.hpp - boost/config/compiler/vacpp.hpp - boost/config/compiler/visualc.hpp - boost/config/compiler/xlcpp.hpp - boost/config/detail/posix_features.hpp - boost/config/detail/select_platform_config.hpp - boost/config/detail/select_stdlib_config.hpp - boost/config/no_tr1/cmath.hpp - boost/config/no_tr1/complex.hpp - boost/config/no_tr1/functional.hpp - boost/config/no_tr1/memory.hpp - boost/config/no_tr1/utility.hpp - boost/config/platform/aix.hpp - boost/config/platform/amigaos.hpp - boost/config/platform/beos.hpp - boost/config/platform/bsd.hpp - boost/config/platform/cray.hpp - boost/config/platform/cygwin.hpp - boost/config/platform/haiku.hpp - boost/config/platform/hpux.hpp - boost/config/platform/irix.hpp - boost/config/platform/linux.hpp - boost/config/platform/macos.hpp - boost/config/platform/qnxnto.hpp - boost/config/platform/solaris.hpp - boost/config/platform/symbian.hpp - boost/config/platform/vms.hpp - boost/config/platform/vxworks.hpp - boost/config/platform/win32.hpp - boost/config/requires_threads.hpp - boost/config/stdlib/dinkumware.hpp - boost/config/stdlib/libcomo.hpp - boost/config/stdlib/libcpp.hpp - boost/config/stdlib/libstdcpp3.hpp - boost/config/stdlib/modena.hpp - boost/config/stdlib/msl.hpp - boost/config/stdlib/roguewave.hpp - boost/config/stdlib/sgi.hpp - boost/config/stdlib/stlport.hpp - boost/config/stdlib/vacpp.hpp - boost/config/user.hpp - boost/config/warning_disable.hpp - -Boost Software License, Version 1.0 (variant #2) - - Copyright (c) Date Author - - Subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -This license is used by the following 32 copyright holders: - - Aleksey Gurtovoy - Artyom Beilis - Beman Dawes - Bill Kempf - Boris Gubenko - Brian Kuhl - Bryce Lelbach - Christof Meerwald - Christopher Jefferson - Cray Inc - Dan Watkins - Darin Adler - David Abrahams - Douglas Gregor - Dustin Spicuzza - Eric Jourdanneau - Guillaume Melquiond - Jens Maurer - Jessica Hamilton - Jim Douglas - Joel Falcou - John Maddock - Lie-Quan Lee - Markus Schoepflin - Martin Wille - Noel Belcourt - Peter Dimov - Rene Rivera - Stefan Slapeta - Synge Todo - Toon Knapen - Yuriy Krasnoschek - -This license applies to the following 70 files: - - boost/config.hpp - boost/config/abi/borland_prefix.hpp - boost/config/abi/borland_suffix.hpp - boost/config/abi/msvc_prefix.hpp - boost/config/abi/msvc_suffix.hpp - boost/config/abi_prefix.hpp - boost/config/abi_suffix.hpp - boost/config/auto_link.hpp - boost/config/compiler/borland.hpp - boost/config/compiler/clang.hpp - boost/config/compiler/codegear.hpp - boost/config/compiler/comeau.hpp - boost/config/compiler/common_edg.hpp - boost/config/compiler/compaq_cxx.hpp - boost/config/compiler/cray.hpp - boost/config/compiler/diab.hpp - boost/config/compiler/digitalmars.hpp - boost/config/compiler/gcc.hpp - boost/config/compiler/gcc_xml.hpp - boost/config/compiler/greenhills.hpp - boost/config/compiler/hp_acc.hpp - boost/config/compiler/intel.hpp - boost/config/compiler/kai.hpp - boost/config/compiler/metrowerks.hpp - boost/config/compiler/mpw.hpp - boost/config/compiler/nvcc.hpp - boost/config/compiler/pathscale.hpp - boost/config/compiler/pgi.hpp - boost/config/compiler/sgi_mipspro.hpp - boost/config/compiler/sunpro_cc.hpp - boost/config/compiler/vacpp.hpp - boost/config/compiler/visualc.hpp - boost/config/compiler/xlcpp.hpp - boost/config/detail/posix_features.hpp - boost/config/detail/select_platform_config.hpp - boost/config/detail/select_stdlib_config.hpp - boost/config/no_tr1/cmath.hpp - boost/config/no_tr1/complex.hpp - boost/config/no_tr1/functional.hpp - boost/config/no_tr1/memory.hpp - boost/config/no_tr1/utility.hpp - boost/config/platform/aix.hpp - boost/config/platform/amigaos.hpp - boost/config/platform/beos.hpp - boost/config/platform/bsd.hpp - boost/config/platform/cray.hpp - boost/config/platform/cygwin.hpp - boost/config/platform/haiku.hpp - boost/config/platform/hpux.hpp - boost/config/platform/irix.hpp - boost/config/platform/linux.hpp - boost/config/platform/macos.hpp - boost/config/platform/qnxnto.hpp - boost/config/platform/solaris.hpp - boost/config/platform/symbian.hpp - boost/config/platform/vms.hpp - boost/config/platform/vxworks.hpp - boost/config/platform/win32.hpp - boost/config/requires_threads.hpp - boost/config/stdlib/dinkumware.hpp - boost/config/stdlib/libcomo.hpp - boost/config/stdlib/libcpp.hpp - boost/config/stdlib/libstdcpp3.hpp - boost/config/stdlib/modena.hpp - boost/config/stdlib/msl.hpp - boost/config/stdlib/roguewave.hpp - boost/config/stdlib/sgi.hpp - boost/config/stdlib/stlport.hpp - boost/config/stdlib/vacpp.hpp - boost/config/user.hpp diff --git a/native_client/boost_locale/boost/config.hpp b/native_client/boost_locale/boost/config.hpp deleted file mode 100644 index f00a980579..0000000000 --- a/native_client/boost_locale/boost/config.hpp +++ /dev/null @@ -1,67 +0,0 @@ -// Boost config.hpp configuration header file ------------------------------// - -// (C) Copyright John Maddock 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/config for most recent version. - -// Boost config.hpp policy and rationale documentation has been moved to -// http://www.boost.org/libs/config -// -// CAUTION: This file is intended to be completely stable - -// DO NOT MODIFY THIS FILE! -// - -#ifndef BOOST_CONFIG_HPP -#define BOOST_CONFIG_HPP - -// if we don't have a user config, then use the default location: -#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG) -# define BOOST_USER_CONFIG -#if 0 -// For dependency trackers: -# include -#endif -#endif -// include it first: -#ifdef BOOST_USER_CONFIG -# include BOOST_USER_CONFIG -#endif - -// if we don't have a compiler config set, try and find one: -#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG) -# include -#endif -// if we have a compiler config, include it now: -#ifdef BOOST_COMPILER_CONFIG -# include BOOST_COMPILER_CONFIG -#endif - -// if we don't have a std library config set, try and find one: -#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus) -# include -#endif -// if we have a std library config, include it now: -#ifdef BOOST_STDLIB_CONFIG -# include BOOST_STDLIB_CONFIG -#endif - -// if we don't have a platform config set, try and find one: -#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG) -# include -#endif -// if we have a platform config, include it now: -#ifdef BOOST_PLATFORM_CONFIG -# include BOOST_PLATFORM_CONFIG -#endif - -// get config suffix code: -#include - -#ifdef BOOST_HAS_PRAGMA_ONCE -#pragma once -#endif - -#endif // BOOST_CONFIG_HPP diff --git a/native_client/boost_locale/boost/config/abi/borland_prefix.hpp b/native_client/boost_locale/boost/config/abi/borland_prefix.hpp deleted file mode 100644 index 3a0e5ae2d7..0000000000 --- a/native_client/boost_locale/boost/config/abi/borland_prefix.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// (C) Copyright John Maddock 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// for C++ Builder the following options effect the ABI: -// -// -b (on or off - effect emum sizes) -// -Vx (on or off - empty members) -// -Ve (on or off - empty base classes) -// -aX (alignment - 5 options). -// -pX (Calling convention - 4 options) -// -VmX (member pointer size and layout - 5 options) -// -VC (on or off, changes name mangling) -// -Vl (on or off, changes struct layout). - -// In addition the following warnings are sufficiently annoying (and -// unfixable) to have them turned off by default: -// -// 8027 - functions containing [for|while] loops are not expanded inline -// 8026 - functions taking class by value arguments are not expanded inline - -#pragma nopushoptwarn -# pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026 - - - diff --git a/native_client/boost_locale/boost/config/abi/borland_suffix.hpp b/native_client/boost_locale/boost/config/abi/borland_suffix.hpp deleted file mode 100644 index 940535f381..0000000000 --- a/native_client/boost_locale/boost/config/abi/borland_suffix.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// (C) Copyright John Maddock 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -# pragma option pop -#pragma nopushoptwarn - - - - - diff --git a/native_client/boost_locale/boost/config/abi/msvc_prefix.hpp b/native_client/boost_locale/boost/config/abi/msvc_prefix.hpp deleted file mode 100644 index 97f06cdc0c..0000000000 --- a/native_client/boost_locale/boost/config/abi/msvc_prefix.hpp +++ /dev/null @@ -1,22 +0,0 @@ -// (C) Copyright John Maddock 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// -// Boost binaries are built with the compiler's default ABI settings, -// if the user changes their default alignment in the VS IDE then their -// code will no longer be binary compatible with the bjam built binaries -// unless this header is included to force Boost code into a consistent ABI. -// -// Note that inclusion of this header is only necessary for libraries with -// separate source, header only libraries DO NOT need this as long as all -// translation units are built with the same options. -// -#if defined(_M_X64) -# pragma pack(push,16) -#else -# pragma pack(push,8) -#endif - - diff --git a/native_client/boost_locale/boost/config/abi/msvc_suffix.hpp b/native_client/boost_locale/boost/config/abi/msvc_suffix.hpp deleted file mode 100644 index a64d783eb0..0000000000 --- a/native_client/boost_locale/boost/config/abi/msvc_suffix.hpp +++ /dev/null @@ -1,8 +0,0 @@ -// (C) Copyright John Maddock 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#pragma pack(pop) - - diff --git a/native_client/boost_locale/boost/config/abi_prefix.hpp b/native_client/boost_locale/boost/config/abi_prefix.hpp deleted file mode 100644 index 3b1347492c..0000000000 --- a/native_client/boost_locale/boost/config/abi_prefix.hpp +++ /dev/null @@ -1,25 +0,0 @@ -// abi_prefix header -------------------------------------------------------// - -// (c) Copyright John Maddock 2003 - -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). - -#ifndef BOOST_CONFIG_ABI_PREFIX_HPP -# define BOOST_CONFIG_ABI_PREFIX_HPP -#else -# error double inclusion of header boost/config/abi_prefix.hpp is an error -#endif - -#include - -// this must occur after all other includes and before any code appears: -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_PREFIX -#endif - -#if defined( __BORLANDC__ ) -#pragma nopushoptwarn -#endif - diff --git a/native_client/boost_locale/boost/config/abi_suffix.hpp b/native_client/boost_locale/boost/config/abi_suffix.hpp deleted file mode 100644 index 939161662a..0000000000 --- a/native_client/boost_locale/boost/config/abi_suffix.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// abi_sufffix header -------------------------------------------------------// - -// (c) Copyright John Maddock 2003 - -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). - -// This header should be #included AFTER code that was preceded by a #include -// . - -#ifndef BOOST_CONFIG_ABI_PREFIX_HPP -# error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp -#else -# undef BOOST_CONFIG_ABI_PREFIX_HPP -#endif - -// the suffix header occurs after all of our code: -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_SUFFIX -#endif - -#if defined( __BORLANDC__ ) -#pragma nopushoptwarn -#endif - - diff --git a/native_client/boost_locale/boost/config/auto_link.hpp b/native_client/boost_locale/boost/config/auto_link.hpp deleted file mode 100644 index c71e8035dd..0000000000 --- a/native_client/boost_locale/boost/config/auto_link.hpp +++ /dev/null @@ -1,444 +0,0 @@ -// (C) Copyright John Maddock 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - /* - * LOCATION: see http://www.boost.org for most recent version. - * FILE auto_link.hpp - * VERSION see - * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers. - */ - -/************************************************************************* - -USAGE: -~~~~~~ - -Before including this header you must define one or more of define the following macros: - -BOOST_LIB_NAME: Required: A string containing the basename of the library, - for example boost_regex. -BOOST_LIB_TOOLSET: Optional: the base name of the toolset. -BOOST_DYN_LINK: Optional: when set link to dll rather than static library. -BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name - of the library selected (useful for debugging). -BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib, - rather than a mangled-name version. -BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option. - This is essentially the same as the default name-mangled version, but without - the compiler name and version, or the Boost version. Just the build options. - -These macros will be undef'ed at the end of the header, further this header -has no include guards - so be sure to include it only once from your library! - -Algorithm: -~~~~~~~~~~ - -Libraries for Borland and Microsoft compilers are automatically -selected here, the name of the lib is selected according to the following -formula: - -BOOST_LIB_PREFIX - + BOOST_LIB_NAME - + "_" - + BOOST_LIB_TOOLSET - + BOOST_LIB_THREAD_OPT - + BOOST_LIB_RT_OPT - "-" - + BOOST_LIB_VERSION - -These are defined as: - -BOOST_LIB_PREFIX: "lib" for static libraries otherwise "". - -BOOST_LIB_NAME: The base name of the lib ( for example boost_regex). - -BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc). - -BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. - -BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, - contains one or more of the following letters after - a hyphen: - - s static runtime (dynamic if not present). - g debug/diagnostic runtime (release if not present). - y Python debug/diagnostic runtime (release if not present). - d debug build (release if not present). - p STLport build. - n STLport build without its IOStreams. - -BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. - - -***************************************************************************/ - -#ifdef __cplusplus -# ifndef BOOST_CONFIG_HPP -# include -# endif -#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__) -// -// C language compatability (no, honestly) -// -# define BOOST_MSVC _MSC_VER -# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) -# define BOOST_DO_STRINGIZE(X) #X -#endif -// -// Only include what follows for known and supported compilers: -// -#if defined(BOOST_MSVC) \ - || defined(__BORLANDC__) \ - || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \ - || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) - -#ifndef BOOST_VERSION_HPP -# include -#endif - -#ifndef BOOST_LIB_NAME -# error "Macro BOOST_LIB_NAME not set (internal error)" -#endif - -// -// error check: -// -#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG) -# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors") -# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes") -# error "Incompatible build options" -#endif -// -// select toolset if not defined already: -// -#ifndef BOOST_LIB_TOOLSET -# if defined(BOOST_MSVC) && (BOOST_MSVC < 1200) - // Note: no compilers before 1200 are supported -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300) - -# ifdef UNDER_CE - // eVC4: -# define BOOST_LIB_TOOLSET "evc4" -# else - // vc6: -# define BOOST_LIB_TOOLSET "vc6" -# endif - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310) - - // vc7: -# define BOOST_LIB_TOOLSET "vc7" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400) - - // vc71: -# define BOOST_LIB_TOOLSET "vc71" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500) - - // vc80: -# define BOOST_LIB_TOOLSET "vc80" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600) - - // vc90: -# define BOOST_LIB_TOOLSET "vc90" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700) - - // vc10: -# define BOOST_LIB_TOOLSET "vc100" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800) - - // vc11: -# define BOOST_LIB_TOOLSET "vc110" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1900) - - // vc12: -# define BOOST_LIB_TOOLSET "vc120" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1910) - - // vc14: -# define BOOST_LIB_TOOLSET "vc140" - -# elif defined(BOOST_MSVC) - - // vc14.1: -# define BOOST_LIB_TOOLSET "vc141" - -# elif defined(__BORLANDC__) - - // CBuilder 6: -# define BOOST_LIB_TOOLSET "bcb" - -# elif defined(__ICL) - - // Intel C++, no version number: -# define BOOST_LIB_TOOLSET "iw" - -# elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF ) - - // Metrowerks CodeWarrior 8.x -# define BOOST_LIB_TOOLSET "cw8" - -# elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF ) - - // Metrowerks CodeWarrior 9.x -# define BOOST_LIB_TOOLSET "cw9" - -# endif -#endif // BOOST_LIB_TOOLSET - -// -// select thread opt: -// -#if defined(_MT) || defined(__MT__) -# define BOOST_LIB_THREAD_OPT "-mt" -#else -# define BOOST_LIB_THREAD_OPT -#endif - -#if defined(_MSC_VER) || defined(__MWERKS__) - -# ifdef _DLL - -# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) - -# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-gydp" -# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) -# define BOOST_LIB_RT_OPT "-gdp" -# elif defined(_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-gydp" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-gdp" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# else -# define BOOST_LIB_RT_OPT "-p" -# endif - -# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) - -# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-gydpn" -# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) -# define BOOST_LIB_RT_OPT "-gdpn" -# elif defined(_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-gydpn" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-gdpn" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# else -# define BOOST_LIB_RT_OPT "-pn" -# endif - -# else - -# if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-gyd" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-gd" -# else -# define BOOST_LIB_RT_OPT -# endif - -# endif - -# else - -# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) - -# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sgydp" -# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) -# define BOOST_LIB_RT_OPT "-sgdp" -# elif defined(_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sgydp" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-sgdp" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# else -# define BOOST_LIB_RT_OPT "-sp" -# endif - -# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) - -# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sgydpn" -# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) -# define BOOST_LIB_RT_OPT "-sgdpn" -# elif defined(_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sgydpn" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-sgdpn" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# else -# define BOOST_LIB_RT_OPT "-spn" -# endif - -# else - -# if defined(_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sgyd" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-sgd" -# else -# define BOOST_LIB_RT_OPT "-s" -# endif - -# endif - -# endif - -#elif defined(__BORLANDC__) - -// -// figure out whether we want the debug builds or not: -// -#if __BORLANDC__ > 0x561 -#pragma defineonoption BOOST_BORLAND_DEBUG -v -#endif -// -// sanity check: -// -#if defined(__STL_DEBUG) || defined(_STLP_DEBUG) -#error "Pre-built versions of the Boost libraries are not provided in STLport-debug form" -#endif - -# ifdef _RTLDLL - -# if defined(BOOST_BORLAND_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-yd" -# elif defined(BOOST_BORLAND_DEBUG) -# define BOOST_LIB_RT_OPT "-d" -# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT -y -# else -# define BOOST_LIB_RT_OPT -# endif - -# else - -# if defined(BOOST_BORLAND_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-syd" -# elif defined(BOOST_BORLAND_DEBUG) -# define BOOST_LIB_RT_OPT "-sd" -# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sy" -# else -# define BOOST_LIB_RT_OPT "-s" -# endif - -# endif - -#endif - -// -// select linkage opt: -// -#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK) -# define BOOST_LIB_PREFIX -#elif defined(BOOST_DYN_LINK) -# error "Mixing a dll boost library with a static runtime is a really bad idea..." -#else -# define BOOST_LIB_PREFIX "lib" -#endif - -// -// now include the lib: -// -#if defined(BOOST_LIB_NAME) \ - && defined(BOOST_LIB_PREFIX) \ - && defined(BOOST_LIB_TOOLSET) \ - && defined(BOOST_LIB_THREAD_OPT) \ - && defined(BOOST_LIB_RT_OPT) \ - && defined(BOOST_LIB_VERSION) - -#ifdef BOOST_AUTO_LINK_TAGGED -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") -# ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") -# endif -#elif defined(BOOST_AUTO_LINK_NOMANGLE) -# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") -# ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") -# endif -#elif defined(BOOST_LIB_BUILDID) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") -# ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") -# endif -#else -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") -# ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") -# endif -#endif - -#else -# error "some required macros where not defined (internal logic error)." -#endif - - -#endif // _MSC_VER || __BORLANDC__ - -// -// finally undef any macros we may have set: -// -#ifdef BOOST_LIB_PREFIX -# undef BOOST_LIB_PREFIX -#endif -#if defined(BOOST_LIB_NAME) -# undef BOOST_LIB_NAME -#endif -// Don't undef this one: it can be set by the user and should be the -// same for all libraries: -//#if defined(BOOST_LIB_TOOLSET) -//# undef BOOST_LIB_TOOLSET -//#endif -#if defined(BOOST_LIB_THREAD_OPT) -# undef BOOST_LIB_THREAD_OPT -#endif -#if defined(BOOST_LIB_RT_OPT) -# undef BOOST_LIB_RT_OPT -#endif -#if defined(BOOST_LIB_LINK_OPT) -# undef BOOST_LIB_LINK_OPT -#endif -#if defined(BOOST_LIB_DEBUG_OPT) -# undef BOOST_LIB_DEBUG_OPT -#endif -#if defined(BOOST_DYN_LINK) -# undef BOOST_DYN_LINK -#endif - - diff --git a/native_client/boost_locale/boost/config/compiler/borland.hpp b/native_client/boost_locale/boost/config/compiler/borland.hpp deleted file mode 100644 index fa891def41..0000000000 --- a/native_client/boost_locale/boost/config/compiler/borland.hpp +++ /dev/null @@ -1,331 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Aleksey Gurtovoy 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Borland C++ compiler setup: - -// -// versions check: -// we don't support Borland prior to version 5.4: -#if __BORLANDC__ < 0x540 -# error "Compiler not supported or configured - please reconfigure" -#endif - -// last known compiler version: -#if (__BORLANDC__ > 0x613) -//# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -//# else -//# pragma message( "Unknown compiler version - please run the configure tests and report the results") -//# endif -#elif (__BORLANDC__ == 0x600) -# error "CBuilderX preview compiler is no longer supported" -#endif - -// -// Support macros to help with standard library detection -#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL) -# define BOOST_BCB_WITH_ROGUE_WAVE -#elif __BORLANDC__ < 0x570 -# define BOOST_BCB_WITH_STLPORT -#else -# define BOOST_BCB_WITH_DINKUMWARE -#endif - -// -// Version 5.0 and below: -# if __BORLANDC__ <= 0x0550 -// Borland C++Builder 4 and 5: -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# if __BORLANDC__ == 0x0550 -// Borland C++Builder 5, command-line compiler 5.5: -# define BOOST_NO_OPERATORS_IN_NAMESPACE -# endif -// Variadic macros do not exist for C++ Builder versions 5 and below -#define BOOST_NO_CXX11_VARIADIC_MACROS -# endif - -// Version 5.51 and below: -#if (__BORLANDC__ <= 0x551) -# define BOOST_NO_CV_SPECIALIZATIONS -# define BOOST_NO_CV_VOID_SPECIALIZATIONS -# define BOOST_NO_DEDUCED_TYPENAME -// workaround for missing WCHAR_MAX/WCHAR_MIN: -#ifdef __cplusplus -#include -#include -#else -#include -#include -#endif // __cplusplus -#ifndef WCHAR_MAX -# define WCHAR_MAX 0xffff -#endif -#ifndef WCHAR_MIN -# define WCHAR_MIN 0 -#endif -#endif - -// Borland C++ Builder 6 and below: -#if (__BORLANDC__ <= 0x564) - -# if defined(NDEBUG) && defined(__cplusplus) - // fix broken so that Boost.test works: -# include -# undef strcmp -# endif - // fix broken errno declaration: -# include -# ifndef errno -# define errno errno -# endif - -#endif - -// -// new bug in 5.61: -#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580) - // this seems to be needed by the command line compiler, but not the IDE: -# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS -#endif - -// Borland C++ Builder 2006 Update 2 and below: -#if (__BORLANDC__ <= 0x582) -# define BOOST_NO_SFINAE -# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG -# define BOOST_NO_TEMPLATE_TEMPLATES - -# define BOOST_NO_PRIVATE_IN_AGGREGATE - -# ifdef _WIN32 -# define BOOST_NO_SWPRINTF -# elif defined(linux) || defined(__linux__) || defined(__linux) - // we should really be able to do without this - // but the wcs* functions aren't imported into std:: -# define BOOST_NO_STDC_NAMESPACE - // _CPPUNWIND doesn't get automatically set for some reason: -# pragma defineonoption BOOST_CPPUNWIND -x -# endif -#endif - -#if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info - // we shouldn't really need this - but too many things choke - // without it, this needs more investigation: -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -# define BOOST_NO_IS_ABSTRACT -# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS -# define BOOST_NO_USING_TEMPLATE -# define BOOST_SP_NO_SP_CONVERTIBLE - -// Temporary workaround -#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -#endif - -// Borland C++ Builder 2008 and below: -# define BOOST_NO_INTEGRAL_INT64_T -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE -# define BOOST_NO_NESTED_FRIENDSHIP -# define BOOST_NO_TYPENAME_WITH_CTOR -#if (__BORLANDC__ < 0x600) -# define BOOST_ILLEGAL_CV_REFERENCES -#endif - -// -// Positive Feature detection -// -// Borland C++ Builder 2008 and below: -#if (__BORLANDC__ >= 0x599) -# pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax -#endif -// -// C++0x Macros: -// -#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610) -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -# define BOOST_NO_CXX11_DECLTYPE -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_CXX11_EXTERN_TEMPLATE -# define BOOST_NO_CXX11_RVALUE_REFERENCES -# define BOOST_NO_CXX11_SCOPED_ENUMS -# define BOOST_NO_CXX11_STATIC_ASSERT -#else -# define BOOST_HAS_ALIGNOF -# define BOOST_HAS_CHAR16_T -# define BOOST_HAS_CHAR32_T -# define BOOST_HAS_DECLTYPE -# define BOOST_HAS_EXPLICIT_CONVERSION_OPS -# define BOOST_HAS_REF_QUALIFIER -# define BOOST_HAS_RVALUE_REFS -# define BOOST_HAS_STATIC_ASSERT -#endif - -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_RVALUE_REFERENCES -#define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_SFINAE_EXPR -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL -#define BOOST_NO_CXX11_THREAD_LOCAL - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif - -#if __BORLANDC__ >= 0x590 -# define BOOST_HAS_TR1_HASH - -# define BOOST_HAS_MACRO_USE_FACET -#endif - -// -// Post 0x561 we have long long and stdint.h: -#if __BORLANDC__ >= 0x561 -# ifndef __NO_LONG_LONG -# define BOOST_HAS_LONG_LONG -# else -# define BOOST_NO_LONG_LONG -# endif - // On non-Win32 platforms let the platform config figure this out: -# ifdef _WIN32 -# define BOOST_HAS_STDINT_H -# endif -#endif - -// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is -// defined, then we have 0x560 or greater with the Rogue Wave implementation -// which presumably has the std::DBL_MAX bug. -#if defined( BOOST_BCB_WITH_ROGUE_WAVE ) -// is partly broken, some macros define symbols that are really in -// namespace std, so you end up having to use illegal constructs like -// std::DBL_MAX, as a fix we'll just include float.h and have done with: -#include -#endif -// -// __int64: -// -#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) -# define BOOST_HAS_MS_INT64 -#endif -// -// check for exception handling support: -// -#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif -// -// all versions have a : -// -#ifndef __STRICT_ANSI__ -# define BOOST_HAS_DIRENT_H -#endif -// -// all versions support __declspec: -// -#if defined(__STRICT_ANSI__) -// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined -# define BOOST_SYMBOL_EXPORT -#endif -// -// ABI fixing headers: -// -#if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet -#ifndef BOOST_ABI_PREFIX -# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" -#endif -#ifndef BOOST_ABI_SUFFIX -# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" -#endif -#endif -// -// Disable Win32 support in ANSI mode: -// -#if __BORLANDC__ < 0x600 -# pragma defineonoption BOOST_DISABLE_WIN32 -A -#elif defined(__STRICT_ANSI__) -# define BOOST_DISABLE_WIN32 -#endif -// -// MSVC compatibility mode does some nasty things: -// TODO: look up if this doesn't apply to the whole 12xx range -// -#if defined(_MSC_VER) && (_MSC_VER <= 1200) -# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -# define BOOST_NO_VOID_RETURNS -#endif - -// Borland did not implement value-initialization completely, as I reported -// in 2007, Borland Report 51854, "Value-initialization: POD struct should be -// zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854 -// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues -// (Niels Dekker, LKEB, April 2010) -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION - -#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) diff --git a/native_client/boost_locale/boost/config/compiler/clang.hpp b/native_client/boost_locale/boost/config/compiler/clang.hpp deleted file mode 100644 index 157a94d267..0000000000 --- a/native_client/boost_locale/boost/config/compiler/clang.hpp +++ /dev/null @@ -1,327 +0,0 @@ -// (C) Copyright Douglas Gregor 2010 -// -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Clang compiler setup. - -#define BOOST_HAS_PRAGMA_ONCE - -// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. -#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) -# define BOOST_HAS_PRAGMA_DETECT_MISMATCH -#endif - -// When compiling with clang before __has_extension was defined, -// even if one writes 'defined(__has_extension) && __has_extension(xxx)', -// clang reports a compiler error. So the only workaround found is: - -#ifndef __has_extension -#define __has_extension __has_feature -#endif - -#ifndef __has_attribute -#define __has_attribute(x) 0 -#endif - -#ifndef __has_cpp_attribute -#define __has_cpp_attribute(x) 0 -#endif - -#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif - -#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) -# define BOOST_NO_RTTI -#endif - -#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) -# define BOOST_NO_TYPEID -#endif - -#if !__has_feature(cxx_thread_local) -# define BOOST_NO_CXX11_THREAD_LOCAL -#endif - -#ifdef __is_identifier -#if !__is_identifier(__int64) && !defined(__GNUC__) -# define BOOST_HAS_MS_INT64 -#endif -#endif - -#if __has_include() -# define BOOST_HAS_STDINT_H -#endif - - -#define BOOST_HAS_NRVO - -// Branch prediction hints -#if !defined (__c2__) && defined(__has_builtin) -#if __has_builtin(__builtin_expect) -#define BOOST_LIKELY(x) __builtin_expect(x, 1) -#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) -#endif -#endif - -// Clang supports "long long" in all compilation modes. -#define BOOST_HAS_LONG_LONG - -// -// We disable this if the compiler is really nvcc with C++03 as it -// doesn't actually support __int128 as of CUDA_VERSION=7500 -// even though it defines __SIZEOF_INT128__. -// See https://svn.boost.org/trac/boost/ticket/10418 -// https://svn.boost.org/trac/boost/ticket/11852 -// Only re-enable this for nvcc if you're absolutely sure -// of the circumstances under which it's supported. -// Similarly __SIZEOF_INT128__ is defined when targetting msvc -// compatibility even though the required support functions are absent. -// -#if defined(__CUDACC__) -# if defined(BOOST_GCC_CXX11) -# define BOOST_NVCC_CXX11 -# else -# define BOOST_NVCC_CXX03 -# endif -#endif - -#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER) -# define BOOST_HAS_INT128 -#endif - - -// -// Dynamic shared object (DSO) and dynamic-link library (DLL) support -// -#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) -# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) -# define BOOST_SYMBOL_IMPORT -# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) -#endif - -// -// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through -// between switch labels. -// -#if __cplusplus >= 201103L && defined(__has_warning) -# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") -# define BOOST_FALLTHROUGH [[clang::fallthrough]] -# endif -#endif - -#if !__has_feature(cxx_auto_type) -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#endif - -// -// Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t -// -#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -#endif - -#if defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(__GNUC__) -#define BOOST_HAS_EXPM1 -#define BOOST_HAS_LOG1P -#endif - -#if !__has_feature(cxx_constexpr) -# define BOOST_NO_CXX11_CONSTEXPR -#endif - -#if !__has_feature(cxx_decltype) -# define BOOST_NO_CXX11_DECLTYPE -#endif - -#if !__has_feature(cxx_decltype_incomplete_return_types) -# define BOOST_NO_CXX11_DECLTYPE_N3276 -#endif - -#if !__has_feature(cxx_defaulted_functions) -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#endif - -#if !__has_feature(cxx_deleted_functions) -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -#endif - -#if !__has_feature(cxx_explicit_conversions) -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif - -#if !__has_feature(cxx_default_function_template_args) -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#endif - -#if !__has_feature(cxx_generalized_initializers) -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif - -#if !__has_feature(cxx_lambdas) -# define BOOST_NO_CXX11_LAMBDAS -#endif - -#if !__has_feature(cxx_local_type_template_args) -# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#endif - -#if !__has_feature(cxx_noexcept) -# define BOOST_NO_CXX11_NOEXCEPT -#endif - -#if !__has_feature(cxx_nullptr) -# define BOOST_NO_CXX11_NULLPTR -#endif - -#if !__has_feature(cxx_range_for) -# define BOOST_NO_CXX11_RANGE_BASED_FOR -#endif - -#if !__has_feature(cxx_raw_string_literals) -# define BOOST_NO_CXX11_RAW_LITERALS -#endif - -#if !__has_feature(cxx_reference_qualified_functions) -# define BOOST_NO_CXX11_REF_QUALIFIERS -#endif - -#if !__has_feature(cxx_generalized_initializers) -# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#endif - -#if !__has_feature(cxx_rvalue_references) -# define BOOST_NO_CXX11_RVALUE_REFERENCES -#endif - -#if !__has_feature(cxx_strong_enums) -# define BOOST_NO_CXX11_SCOPED_ENUMS -#endif - -#if !__has_feature(cxx_static_assert) -# define BOOST_NO_CXX11_STATIC_ASSERT -#endif - -#if !__has_feature(cxx_alias_templates) -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -#endif - -#if !__has_feature(cxx_unicode_literals) -# define BOOST_NO_CXX11_UNICODE_LITERALS -#endif - -#if !__has_feature(cxx_variadic_templates) -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif - -#if !__has_feature(cxx_user_literals) -# define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#endif - -#if !__has_feature(cxx_alignas) -# define BOOST_NO_CXX11_ALIGNAS -#endif - -#if !__has_feature(cxx_trailing_return) -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#endif - -#if !__has_feature(cxx_inline_namespaces) -# define BOOST_NO_CXX11_INLINE_NAMESPACES -#endif - -#if !__has_feature(cxx_override_control) -# define BOOST_NO_CXX11_FINAL -#endif - -#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif - -#if !__has_feature(__cxx_decltype_auto__) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif - -#if !__has_feature(__cxx_aggregate_nsdmi__) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif - -#if !__has_feature(__cxx_init_captures__) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif - -#if !__has_feature(__cxx_generic_lambdas__) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif - -// clang < 3.5 has a defect with dependent type, like following. -// -// template -// constexpr typename enable_if >::type foo(T &) -// { } // error: no return statement in constexpr function -// -// This issue also affects C++11 mode, but C++11 constexpr requires return stmt. -// Therefore we don't care such case. -// -// Note that we can't check Clang version directly as the numbering system changes depending who's -// creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873) -// so instead verify that we have a feature that was introduced at the same time as working C++14 -// constexpr (generic lambda's in this case): -// -#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) -# define BOOST_NO_CXX14_CONSTEXPR -#endif - -#if !__has_feature(__cxx_return_type_deduction__) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif - -#if !__has_feature(__cxx_variable_templates__) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif - -// Clang 3.9+ in c++1z -#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L -# define BOOST_NO_CXX17_INLINE_VARIABLES -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif - -#if __cplusplus < 201103L -#define BOOST_NO_CXX11_SFINAE_EXPR -#endif - -#if __cplusplus < 201400 -// All versions with __cplusplus above this value seem to support this: -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -// -// __builtin_unreachable: -#if defined(__has_builtin) && __has_builtin(__builtin_unreachable) -#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); -#endif - -#if (__clang_major__ == 3) && (__clang_minor__ == 0) -// Apparently a clang bug: -# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS -#endif - -// Clang has supported the 'unused' attribute since the first release. -#define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) - -#ifndef BOOST_COMPILER -# define BOOST_COMPILER "Clang version " __clang_version__ -#endif - -// Macro used to identify the Clang compiler. -#define BOOST_CLANG 1 - diff --git a/native_client/boost_locale/boost/config/compiler/codegear.hpp b/native_client/boost_locale/boost/config/compiler/codegear.hpp deleted file mode 100644 index 44ca8428e4..0000000000 --- a/native_client/boost_locale/boost/config/compiler/codegear.hpp +++ /dev/null @@ -1,235 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Aleksey Gurtovoy 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// CodeGear C++ compiler setup: - -#if !defined( BOOST_WITH_CODEGEAR_WARNINGS ) -// these warnings occur frequently in optimized template code -# pragma warn -8004 // var assigned value, but never used -# pragma warn -8008 // condition always true/false -# pragma warn -8066 // dead code can never execute -# pragma warn -8104 // static members with ctors not threadsafe -# pragma warn -8105 // reference member in class without ctors -#endif -// -// versions check: -// last known and checked version is 0x621 -#if (__CODEGEARC__ > 0x621) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# else -# pragma message( "Unknown compiler version - please run the configure tests and report the results") -# endif -#endif - -// CodeGear C++ Builder 2009 -#if (__CODEGEARC__ <= 0x613) -# define BOOST_NO_INTEGRAL_INT64_T -# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS -# define BOOST_NO_PRIVATE_IN_AGGREGATE -# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE - // we shouldn't really need this - but too many things choke - // without it, this needs more investigation: -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -# define BOOST_SP_NO_SP_CONVERTIBLE -#endif - -// CodeGear C++ Builder 2010 -#if (__CODEGEARC__ <= 0x621) -# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member -# define BOOST_NO_USING_TEMPLATE -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -// Temporary hack, until specific MPL preprocessed headers are generated -# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS - -// CodeGear has not yet completely implemented value-initialization, for -// example for array types, as I reported in 2010: Embarcadero Report 83751, -// "Value-initialization: arrays should have each element value-initialized", -// http://qc.embarcadero.com/wc/qcmain.aspx?d=83751 -// Last checked version: Embarcadero C++ 6.21 -// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues -// (Niels Dekker, LKEB, April 2010) -# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION - -# if defined(NDEBUG) && defined(__cplusplus) - // fix broken so that Boost.test works: -# include -# undef strcmp -# endif - // fix broken errno declaration: -# include -# ifndef errno -# define errno errno -# endif - -#endif - -// Reportedly, #pragma once is supported since C++ Builder 2010 -#if (__CODEGEARC__ >= 0x620) -# define BOOST_HAS_PRAGMA_ONCE -#endif - -// -// C++0x macros: -// -#if (__CODEGEARC__ <= 0x620) -#define BOOST_NO_CXX11_STATIC_ASSERT -#else -#define BOOST_HAS_STATIC_ASSERT -#endif -#define BOOST_HAS_CHAR16_T -#define BOOST_HAS_CHAR32_T -#define BOOST_HAS_LONG_LONG -// #define BOOST_HAS_ALIGNOF -#define BOOST_HAS_DECLTYPE -#define BOOST_HAS_EXPLICIT_CONVERSION_OPS -// #define BOOST_HAS_RVALUE_REFS -#define BOOST_HAS_SCOPED_ENUM -// #define BOOST_HAS_STATIC_ASSERT -#define BOOST_HAS_STD_TYPE_TRAITS - -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXTERN_TEMPLATE -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_RVALUE_REFERENCES -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_SFINAE_EXPR -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL -#define BOOST_NO_CXX11_THREAD_LOCAL - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif - -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif - -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif - -// -// TR1 macros: -// -#define BOOST_HAS_TR1_HASH -#define BOOST_HAS_TR1_TYPE_TRAITS -#define BOOST_HAS_TR1_UNORDERED_MAP -#define BOOST_HAS_TR1_UNORDERED_SET - -#define BOOST_HAS_MACRO_USE_FACET - -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST - -// On non-Win32 platforms let the platform config figure this out: -#ifdef _WIN32 -# define BOOST_HAS_STDINT_H -#endif - -// -// __int64: -// -#if !defined(__STRICT_ANSI__) -# define BOOST_HAS_MS_INT64 -#endif -// -// check for exception handling support: -// -#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif -// -// all versions have a : -// -#if !defined(__STRICT_ANSI__) -# define BOOST_HAS_DIRENT_H -#endif -// -// all versions support __declspec: -// -#if defined(__STRICT_ANSI__) -// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined -# define BOOST_SYMBOL_EXPORT -#endif -// -// ABI fixing headers: -// -#ifndef BOOST_ABI_PREFIX -# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" -#endif -#ifndef BOOST_ABI_SUFFIX -# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" -#endif -// -// Disable Win32 support in ANSI mode: -// -# pragma defineonoption BOOST_DISABLE_WIN32 -A -// -// MSVC compatibility mode does some nasty things: -// TODO: look up if this doesn't apply to the whole 12xx range -// -#if defined(_MSC_VER) && (_MSC_VER <= 1200) -# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -# define BOOST_NO_VOID_RETURNS -#endif - -#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) - diff --git a/native_client/boost_locale/boost/config/compiler/comeau.hpp b/native_client/boost_locale/boost/config/compiler/comeau.hpp deleted file mode 100644 index 09841604f9..0000000000 --- a/native_client/boost_locale/boost/config/compiler/comeau.hpp +++ /dev/null @@ -1,59 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Douglas Gregor 2001. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright Aleksey Gurtovoy 2003. -// (C) Copyright Beman Dawes 2003. -// (C) Copyright Jens Maurer 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Comeau C++ compiler setup: - -#include - -#if (__COMO_VERSION__ <= 4245) - -# if defined(_MSC_VER) && _MSC_VER <= 1300 -# if _MSC_VER > 100 - // only set this in non-strict mode: -# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -# endif -# endif - -// Void returns don't work when emulating VC 6 (Peter Dimov) -// TODO: look up if this doesn't apply to the whole 12xx range -# if defined(_MSC_VER) && (_MSC_VER < 1300) -# define BOOST_NO_VOID_RETURNS -# endif - -#endif // version 4245 - -// -// enable __int64 support in VC emulation mode -// -# if defined(_MSC_VER) && (_MSC_VER >= 1200) -# define BOOST_HAS_MS_INT64 -# endif - -#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__) - -// -// versions check: -// we don't know Comeau prior to version 4245: -#if __COMO_VERSION__ < 4245 -# error "Compiler not configured - please reconfigure" -#endif -// -// last known and checked version is 4245: -#if (__COMO_VERSION__ > 4245) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - - - - diff --git a/native_client/boost_locale/boost/config/compiler/common_edg.hpp b/native_client/boost_locale/boost/config/compiler/common_edg.hpp deleted file mode 100644 index d49ceb68e2..0000000000 --- a/native_client/boost_locale/boost/config/compiler/common_edg.hpp +++ /dev/null @@ -1,156 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// (C) Copyright Jens Maurer 2001. -// (C) Copyright David Abrahams 2002. -// (C) Copyright Aleksey Gurtovoy 2002. -// (C) Copyright Markus Schoepflin 2005. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// -// Options common to all edg based compilers. -// -// This is included from within the individual compiler mini-configs. - -#ifndef __EDG_VERSION__ -# error This file requires that __EDG_VERSION__ be defined. -#endif - -#if (__EDG_VERSION__ <= 238) -# define BOOST_NO_INTEGRAL_INT64_T -# define BOOST_NO_SFINAE -#endif - -#if (__EDG_VERSION__ <= 240) -# define BOOST_NO_VOID_RETURNS -#endif - -#if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) -# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -#endif - -#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES) -# define BOOST_NO_TEMPLATE_TEMPLATES -#endif - -#if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT) -# define BOOST_NO_IS_ABSTRACT -#endif - -#if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#endif - -// See also kai.hpp which checks a Kai-specific symbol for EH -# if !defined(__KCC) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -# endif - -# if !defined(__NO_LONG_LONG) -# define BOOST_HAS_LONG_LONG -# else -# define BOOST_NO_LONG_LONG -# endif - -// Not sure what version was the first to support #pragma once, but -// different EDG-based compilers (e.g. Intel) supported it for ages. -// Add a proper version check if it causes problems. -#define BOOST_HAS_PRAGMA_ONCE - -// -// C++0x features -// -// See above for BOOST_NO_LONG_LONG -// -#if (__EDG_VERSION__ < 310) -# define BOOST_NO_CXX11_EXTERN_TEMPLATE -#endif -#if (__EDG_VERSION__ <= 310) -// No support for initializer lists -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif -#if (__EDG_VERSION__ < 400) -# define BOOST_NO_CXX11_VARIADIC_MACROS -#endif - -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_CHAR32_T -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_RVALUE_REFERENCES -#define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_SFINAE_EXPR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL -#define BOOST_NO_CXX11_THREAD_LOCAL - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif - -#ifdef c_plusplus -// EDG has "long long" in non-strict mode -// However, some libraries have insufficient "long long" support -// #define BOOST_HAS_LONG_LONG -#endif diff --git a/native_client/boost_locale/boost/config/compiler/compaq_cxx.hpp b/native_client/boost_locale/boost/config/compiler/compaq_cxx.hpp deleted file mode 100644 index 4d6b8ab3ac..0000000000 --- a/native_client/boost_locale/boost/config/compiler/compaq_cxx.hpp +++ /dev/null @@ -1,19 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Tru64 C++ compiler setup (now HP): - -#define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER) - -#include - -// -// versions check: -// Nothing to do here? - - - diff --git a/native_client/boost_locale/boost/config/compiler/cray.hpp b/native_client/boost_locale/boost/config/compiler/cray.hpp deleted file mode 100644 index eab5287751..0000000000 --- a/native_client/boost_locale/boost/config/compiler/cray.hpp +++ /dev/null @@ -1,94 +0,0 @@ -// (C) Copyright John Maddock 2011. -// (C) Copyright Cray, Inc. 2013 -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Greenhills C compiler setup: - -#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE) - -#if _RELEASE < 8 -# error "Boost is not configured for Cray compilers prior to version 8, please try the configure script." -#endif - -// -// Check this is a recent EDG based compiler, otherwise we don't support it here: -// -#ifndef __EDG_VERSION__ -# error "Unsupported Cray compiler, please try running the configure script." -#endif - -#include - - -// -// -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_HAS_NRVO -#define BOOST_NO_CXX11_VARIADIC_MACROS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_HAS_NRVO -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_SFINAE_EXPR -#define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_CXX11_RVALUE_REFERENCES -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#define BOOST_NO_CXX11_CHAR32_T -#define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL -#define BOOST_NO_CXX11_THREAD_LOCAL - - -//#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG -#define BOOST_MATH_DISABLE_STD_FPCLASSIFY -//#define BOOST_HAS_FPCLASSIFY - -#define BOOST_SP_USE_PTHREADS -#define BOOST_AC_USE_PTHREADS - -/* everything that follows is working around what are thought to be - * compiler shortcomings. Revist all of these regularly. - */ - -//#define BOOST_USE_ENUM_STATIC_ASSERT -//#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS //(this may be implied by the previous #define - -// These constants should be provided by the -// compiler, at least when -hgnu is asserted on the command line. - -#ifndef __ATOMIC_RELAXED -#define __ATOMIC_RELAXED 0 -#define __ATOMIC_CONSUME 1 -#define __ATOMIC_ACQUIRE 2 -#define __ATOMIC_RELEASE 3 -#define __ATOMIC_ACQ_REL 4 -#define __ATOMIC_SEQ_CST 5 -#endif - - - diff --git a/native_client/boost_locale/boost/config/compiler/diab.hpp b/native_client/boost_locale/boost/config/compiler/diab.hpp deleted file mode 100644 index 0de72d06aa..0000000000 --- a/native_client/boost_locale/boost/config/compiler/diab.hpp +++ /dev/null @@ -1,19 +0,0 @@ -// (C) Copyright Brian Kuhl 2016. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// Check this is a recent EDG based compiler, otherwise we don't support it here: - - -#ifndef __EDG_VERSION__ -# error "Unknown Diab compiler version - please run the configure tests and report the results" -#endif - -#include "boost/config/compiler/common_edg.hpp" - -#define BOOST_HAS_LONG_LONG -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_HDR_CODECVT -#define BOOST_COMPILER "Wind River Diab " BOOST_STRINGIZE(__VERSION_NUMBER__) diff --git a/native_client/boost_locale/boost/config/compiler/digitalmars.hpp b/native_client/boost_locale/boost/config/compiler/digitalmars.hpp deleted file mode 100644 index e4c5afddd2..0000000000 --- a/native_client/boost_locale/boost/config/compiler/digitalmars.hpp +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (C) Christof Meerwald 2003 -// Copyright (C) Dan Watkins 2003 -// -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// Digital Mars C++ compiler setup: -#define BOOST_COMPILER __DMC_VERSION_STRING__ - -#define BOOST_HAS_LONG_LONG -#define BOOST_HAS_PRAGMA_ONCE - -#if !defined(BOOST_STRICT_CONFIG) -#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -#define BOOST_NO_OPERATORS_IN_NAMESPACE -#define BOOST_NO_UNREACHABLE_RETURN_DETECTION -#define BOOST_NO_SFINAE -#define BOOST_NO_USING_TEMPLATE -#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#endif - -// -// has macros: -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_STDINT_H -#define BOOST_HAS_WINTHREADS - -#if (__DMC__ >= 0x847) -#define BOOST_HAS_EXPM1 -#define BOOST_HAS_LOG1P -#endif - -// -// Is this really the best way to detect whether the std lib is in namespace std? -// -#ifdef __cplusplus -#include -#endif -#if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD) -# define BOOST_NO_STDC_NAMESPACE -#endif - - -// check for exception handling support: -#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif - -// -// C++0x features -// -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_CHAR32_T -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_EXTERN_TEMPLATE -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_RVALUE_REFERENCES -#define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_SFINAE_EXPR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL -#define BOOST_NO_CXX11_THREAD_LOCAL - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif - -#if (__DMC__ <= 0x840) -#error "Compiler not supported or configured - please reconfigure" -#endif -// -// last known and checked version is ...: -#if (__DMC__ > 0x848) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif diff --git a/native_client/boost_locale/boost/config/compiler/gcc.hpp b/native_client/boost_locale/boost/config/compiler/gcc.hpp deleted file mode 100644 index d1cfed7a32..0000000000 --- a/native_client/boost_locale/boost/config/compiler/gcc.hpp +++ /dev/null @@ -1,351 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001 - 2002. -// (C) Copyright Jens Maurer 2001 - 2002. -// (C) Copyright Beman Dawes 2001 - 2003. -// (C) Copyright Douglas Gregor 2002. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Synge Todo 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// GNU C++ compiler setup. - -// -// Define BOOST_GCC so we know this is "real" GCC and not some pretender: -// -#define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) -#if !defined(__CUDACC__) -#define BOOST_GCC BOOST_GCC_VERSION -#endif - -#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) -# define BOOST_GCC_CXX11 -#endif - -#if __GNUC__ == 3 -# if defined (__PATHSCALE__) -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -# define BOOST_NO_IS_ABSTRACT -# endif - -# if __GNUC_MINOR__ < 4 -# define BOOST_NO_IS_ABSTRACT -# endif -# define BOOST_NO_CXX11_EXTERN_TEMPLATE -#endif -#if __GNUC__ < 4 -// -// All problems to gcc-3.x and earlier here: -// -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -# ifdef __OPEN64__ -# define BOOST_NO_IS_ABSTRACT -# endif -#endif - -// GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links -#if BOOST_GCC_VERSION >= 30400 -#define BOOST_HAS_PRAGMA_ONCE -#endif - -#if BOOST_GCC_VERSION < 40400 -// Previous versions of GCC did not completely implement value-initialization: -// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize -// members", reported by Jonathan Wakely in 2006, -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) -// GCC Bug 33916, "Default constructor fails to initialize array members", -// reported by Michael Elizabeth Chastain in 2007, -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) -// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#endif - -#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif - - -// -// Threading support: Turn this on unconditionally here (except for -// those platforms where we can know for sure). It will get turned off again -// later if no threading API is detected. -// -#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) -# define BOOST_HAS_THREADS -#endif - -// -// gcc has "long long" -// Except on Darwin with standard compliance enabled (-pedantic) -// Apple gcc helpfully defines this macro we can query -// -#if !defined(__DARWIN_NO_LONG_LONG) -# define BOOST_HAS_LONG_LONG -#endif - -// -// gcc implements the named return value optimization since version 3.1 -// -#define BOOST_HAS_NRVO - -// Branch prediction hints -#define BOOST_LIKELY(x) __builtin_expect(x, 1) -#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) - -// -// Dynamic shared object (DSO) and dynamic-link library (DLL) support -// -#if __GNUC__ >= 4 -# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) - // All Win32 development environments, including 64-bit Windows and MinGW, define - // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, - // so does not define _WIN32 or its variants. -# define BOOST_HAS_DECLSPEC -# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__)) -# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__)) -# else -# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) -# define BOOST_SYMBOL_IMPORT -# endif -# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) -#else -// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined -# define BOOST_SYMBOL_EXPORT -#endif - -// -// RTTI and typeinfo detection is possible post gcc-4.3: -// -#if BOOST_GCC_VERSION > 40300 -# ifndef __GXX_RTTI -# ifndef BOOST_NO_TYPEID -# define BOOST_NO_TYPEID -# endif -# ifndef BOOST_NO_RTTI -# define BOOST_NO_RTTI -# endif -# endif -#endif - -// -// Recent GCC versions have __int128 when in 64-bit mode. -// -// We disable this if the compiler is really nvcc with C++03 as it -// doesn't actually support __int128 as of CUDA_VERSION=7500 -// even though it defines __SIZEOF_INT128__. -// See https://svn.boost.org/trac/boost/ticket/8048 -// https://svn.boost.org/trac/boost/ticket/11852 -// Only re-enable this for nvcc if you're absolutely sure -// of the circumstances under which it's supported: -// -#if defined(__CUDACC__) -# if defined(BOOST_GCC_CXX11) -# define BOOST_NVCC_CXX11 -# else -# define BOOST_NVCC_CXX03 -# endif -#endif - -#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) -# define BOOST_HAS_INT128 -#endif -// -// Recent GCC versions have a __float128 native type, we need to -// include a std lib header to detect this - not ideal, but we'll -// be including later anyway when we select the std lib. -// -// Nevertheless, as of CUDA 7.5, using __float128 with the host -// compiler in pre-C++11 mode is still not supported. -// See https://svn.boost.org/trac/boost/ticket/11852 -// -#ifdef __cplusplus -#include -#else -#include -#endif -#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(BOOST_NVCC_CXX03) -# define BOOST_HAS_FLOAT128 -#endif - -// C++0x features in 4.3.n and later -// -#if (BOOST_GCC_VERSION >= 40300) && defined(BOOST_GCC_CXX11) -// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are -// passed on the command line, which in turn defines -// __GXX_EXPERIMENTAL_CXX0X__. -# define BOOST_HAS_DECLTYPE -# define BOOST_HAS_RVALUE_REFS -# define BOOST_HAS_STATIC_ASSERT -# define BOOST_HAS_VARIADIC_TMPL -#else -# define BOOST_NO_CXX11_DECLTYPE -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -# define BOOST_NO_CXX11_RVALUE_REFERENCES -# define BOOST_NO_CXX11_STATIC_ASSERT -#endif - -// C++0x features in 4.4.n and later -// -#if (BOOST_GCC_VERSION < 40400) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -# define BOOST_NO_CXX11_INLINE_NAMESPACES -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif - -#if BOOST_GCC_VERSION < 40500 -# define BOOST_NO_SFINAE_EXPR -#endif - -// GCC 4.5 forbids declaration of defaulted functions in private or protected sections -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS -#endif - -// C++0x features in 4.5.0 and later -// -#if (BOOST_GCC_VERSION < 40500) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_CXX11_LAMBDAS -# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -# define BOOST_NO_CXX11_RAW_LITERALS -# define BOOST_NO_CXX11_UNICODE_LITERALS -#endif - -// C++0x features in 4.5.1 and later -// -#if (BOOST_GCC_VERSION < 40501) || !defined(BOOST_GCC_CXX11) -// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1 -// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 -# define BOOST_NO_CXX11_SCOPED_ENUMS -#endif - -// C++0x features in 4.6.n and later -// -#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11) -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#endif - -// C++0x features in 4.7.n and later -// -#if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_FINAL -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -# define BOOST_NO_CXX11_USER_DEFINED_LITERALS -# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS -#endif - -// C++0x features in 4.8.n and later -// -#if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_ALIGNAS -# define BOOST_NO_CXX11_THREAD_LOCAL -# define BOOST_NO_CXX11_SFINAE_EXPR -#endif - -// C++0x features in 4.8.1 and later -// -#if (BOOST_GCC_VERSION < 40801) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_DECLTYPE_N3276 -# define BOOST_NO_CXX11_REF_QUALIFIERS -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif - -// C++14 features in 4.9.0 and later -// -#if (BOOST_GCC_VERSION < 40900) || (__cplusplus < 201300) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -# define BOOST_NO_CXX14_DECLTYPE_AUTO -# if !((BOOST_GCC_VERSION >= 40801) && (BOOST_GCC_VERSION < 40900) && defined(BOOST_GCC_CXX11)) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -# endif -#endif - - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif - -#if __GNUC__ >= 7 -# define BOOST_FALLTHROUGH __attribute__((fallthrough)) -#endif - -#ifdef __MINGW32__ -// Currently (June 2017) thread_local is broken on mingw for all current compiler releases, see -// https://sourceforge.net/p/mingw-w64/bugs/527/ -// Not setting this causes program termination on thread exit. -#define BOOST_NO_CXX11_THREAD_LOCAL -#endif - -// -// Unused attribute: -#if __GNUC__ >= 4 -# define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#endif -// -// __builtin_unreachable: -#if BOOST_GCC_VERSION >= 40800 -#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); -#endif - -#ifndef BOOST_COMPILER -# define BOOST_COMPILER "GNU C++ version " __VERSION__ -#endif - -// ConceptGCC compiler: -// http://www.generic-programming.org/software/ConceptGCC/ -#ifdef __GXX_CONCEPTS__ -# define BOOST_HAS_CONCEPTS -# define BOOST_COMPILER "ConceptGCC version " __VERSION__ -#endif - -// versions check: -// we don't know gcc prior to version 3.30: -#if (BOOST_GCC_VERSION< 30300) -# error "Compiler not configured - please reconfigure" -#endif -// -// last known and checked version is 4.9: -#if (BOOST_GCC_VERSION > 40900) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# else -// we don't emit warnings here anymore since there are no defect macros defined for -// gcc post 3.4, so any failures are gcc regressions... -//# warning "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - diff --git a/native_client/boost_locale/boost/config/compiler/gcc_xml.hpp b/native_client/boost_locale/boost/config/compiler/gcc_xml.hpp deleted file mode 100644 index 2b47585ab8..0000000000 --- a/native_client/boost_locale/boost/config/compiler/gcc_xml.hpp +++ /dev/null @@ -1,108 +0,0 @@ -// (C) Copyright John Maddock 2006. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// GCC-XML C++ compiler setup: - -# if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3)) -# define BOOST_NO_IS_ABSTRACT -# endif - -// -// Threading support: Turn this on unconditionally here (except for -// those platforms where we can know for sure). It will get turned off again -// later if no threading API is detected. -// -#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__) -# define BOOST_HAS_THREADS -#endif - -// -// gcc has "long long" -// -#define BOOST_HAS_LONG_LONG - -// C++0x features: -// -# define BOOST_NO_CXX11_CONSTEXPR -# define BOOST_NO_CXX11_NULLPTR -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -# define BOOST_NO_CXX11_DECLTYPE -# define BOOST_NO_CXX11_DECLTYPE_N3276 -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -# define BOOST_NO_CXX11_RVALUE_REFERENCES -# define BOOST_NO_CXX11_STATIC_ASSERT -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -# define BOOST_NO_CXX11_VARIADIC_MACROS -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_SCOPED_ENUMS -# define BOOST_NO_SFINAE_EXPR -# define BOOST_NO_CXX11_SFINAE_EXPR -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_CXX11_LAMBDAS -# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -# define BOOST_NO_CXX11_RANGE_BASED_FOR -# define BOOST_NO_CXX11_RAW_LITERALS -# define BOOST_NO_CXX11_UNICODE_LITERALS -# define BOOST_NO_CXX11_NOEXCEPT -# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -# define BOOST_NO_CXX11_USER_DEFINED_LITERALS -# define BOOST_NO_CXX11_ALIGNAS -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -# define BOOST_NO_CXX11_INLINE_NAMESPACES -# define BOOST_NO_CXX11_REF_QUALIFIERS -# define BOOST_NO_CXX11_FINAL -# define BOOST_NO_CXX11_THREAD_LOCAL - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif - -#define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ - - diff --git a/native_client/boost_locale/boost/config/compiler/greenhills.hpp b/native_client/boost_locale/boost/config/compiler/greenhills.hpp deleted file mode 100644 index a76a07cf4a..0000000000 --- a/native_client/boost_locale/boost/config/compiler/greenhills.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Greenhills C++ compiler setup: - -#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs) - -#include - -// -// versions check: -// we don't support Greenhills prior to version 0: -#if __ghs < 0 -# error "Compiler not supported or configured - please reconfigure" -#endif -// -// last known and checked version is 0: -#if (__ghs > 0) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - - diff --git a/native_client/boost_locale/boost/config/compiler/hp_acc.hpp b/native_client/boost_locale/boost/config/compiler/hp_acc.hpp deleted file mode 100644 index 9df18eaf67..0000000000 --- a/native_client/boost_locale/boost/config/compiler/hp_acc.hpp +++ /dev/null @@ -1,147 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright Aleksey Gurtovoy 2002. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Toon Knapen 2003. -// (C) Copyright Boris Gubenko 2006 - 2007. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// HP aCC C++ compiler setup: - -#if defined(__EDG__) -#include -#endif - -#if (__HP_aCC <= 33100) -# define BOOST_NO_INTEGRAL_INT64_T -# define BOOST_NO_OPERATORS_IN_NAMESPACE -# if !defined(_NAMESPACE_STD) -# define BOOST_NO_STD_LOCALE -# define BOOST_NO_STRINGSTREAM -# endif -#endif - -#if (__HP_aCC <= 33300) -// member templates are sufficiently broken that we disable them for now -# define BOOST_NO_MEMBER_TEMPLATES -# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS -# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE -#endif - -#if (__HP_aCC <= 38000) -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#endif - -#if (__HP_aCC > 50000) && (__HP_aCC < 60000) -# define BOOST_NO_UNREACHABLE_RETURN_DETECTION -# define BOOST_NO_TEMPLATE_TEMPLATES -# define BOOST_NO_SWPRINTF -# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS -# define BOOST_NO_IS_ABSTRACT -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -#endif - -// optional features rather than defects: -#if (__HP_aCC >= 33900) -# define BOOST_HAS_LONG_LONG -# define BOOST_HAS_PARTIAL_STD_ALLOCATOR -#endif - -#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 ) -# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD -#endif - -// This macro should not be defined when compiling in strict ansi -// mode, but, currently, we don't have the ability to determine -// what standard mode we are compiling with. Some future version -// of aCC6 compiler will provide predefined macros reflecting the -// compilation options, including the standard mode. -#if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98)) -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#endif - -#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC) - -// -// versions check: -// we don't support HP aCC prior to version 33000: -#if __HP_aCC < 33000 -# error "Compiler not supported or configured - please reconfigure" -#endif - -// -// Extended checks for supporting aCC on PA-RISC -#if __HP_aCC > 30000 && __HP_aCC < 50000 -# if __HP_aCC < 38000 - // versions prior to version A.03.80 not supported -# error "Compiler version not supported - version A.03.80 or higher is required" -# elif !defined(__hpxstd98) - // must compile using the option +hpxstd98 with version A.03.80 and above -# error "Compiler option '+hpxstd98' is required for proper support" -# endif //PA-RISC -#endif - -// -// C++0x features -// -// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG -// -#if !defined(__EDG__) - -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_CHAR32_T -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_EXTERN_TEMPLATE -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_RVALUE_REFERENCES -#define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_SFINAE_EXPR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_THREAD_LOCAL - -/* - See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and - https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436 -*/ - -#if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE) - #define BOOST_NO_CXX11_VARIADIC_MACROS -#endif - -#endif - -// -// last known and checked version for HP-UX/ia64 is 61300 -// last known and checked version for PA-RISC is 38000 -#if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98))) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif diff --git a/native_client/boost_locale/boost/config/compiler/intel.hpp b/native_client/boost_locale/boost/config/compiler/intel.hpp deleted file mode 100644 index f55189a0ab..0000000000 --- a/native_client/boost_locale/boost/config/compiler/intel.hpp +++ /dev/null @@ -1,557 +0,0 @@ -// (C) Copyright John Maddock 2001-8. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright Jens Maurer 2001. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Aleksey Gurtovoy 2002 - 2003. -// (C) Copyright Guillaume Melquiond 2002 - 2003. -// (C) Copyright Beman Dawes 2003. -// (C) Copyright Martin Wille 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Intel compiler setup: - -#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) - -#ifdef _MSC_VER - -#include - -#undef BOOST_MSVC -#undef BOOST_MSVC_FULL_VER - -#if (__INTEL_COMPILER >= 1500) && (_MSC_VER >= 1900) -// -// These appear to be supported, even though VC++ may not support them: -// -#define BOOST_HAS_EXPM1 -#define BOOST_HAS_LOG1P -#undef BOOST_NO_CXX14_BINARY_LITERALS -// This one may be a little risky to enable?? -#undef BOOST_NO_SFINAE_EXPR - -#endif - -#if (__INTEL_COMPILER <= 1600) && !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -#else // defined(_MSC_VER) - -#include - -#undef BOOST_GCC_VERSION -#undef BOOST_GCC_CXX11 - -// Broken in all versions up to 17 (newer versions not tested) -#if (__INTEL_COMPILER <= 1700) && !defined(BOOST_NO_CXX14_CONSTEXPR) -# define BOOST_NO_CXX14_CONSTEXPR -#endif - -#endif // defined(_MSC_VER) - -#undef BOOST_COMPILER - -#if defined(__INTEL_COMPILER) -#if __INTEL_COMPILER == 9999 -# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1. -#else -# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER -#endif -#elif defined(__ICL) -# define BOOST_INTEL_CXX_VERSION __ICL -#elif defined(__ICC) -# define BOOST_INTEL_CXX_VERSION __ICC -#elif defined(__ECC) -# define BOOST_INTEL_CXX_VERSION __ECC -#endif - -// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' -#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) -# define BOOST_INTEL_STDCXX0X -#endif -#if defined(_MSC_VER) && (_MSC_VER >= 1600) -# define BOOST_INTEL_STDCXX0X -#endif - -#ifdef __GNUC__ -# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) -#endif - -#if !defined(BOOST_COMPILER) -# if defined(BOOST_INTEL_STDCXX0X) -# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) -# else -# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) -# endif -#endif - -#define BOOST_INTEL BOOST_INTEL_CXX_VERSION - -#if defined(_WIN32) || defined(_WIN64) -# define BOOST_INTEL_WIN BOOST_INTEL -#else -# define BOOST_INTEL_LINUX BOOST_INTEL -#endif - -#else // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) - -#include - -#if defined(__INTEL_COMPILER) -#if __INTEL_COMPILER == 9999 -# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1. -#else -# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER -#endif -#elif defined(__ICL) -# define BOOST_INTEL_CXX_VERSION __ICL -#elif defined(__ICC) -# define BOOST_INTEL_CXX_VERSION __ICC -#elif defined(__ECC) -# define BOOST_INTEL_CXX_VERSION __ECC -#endif - -// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' -#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) -# define BOOST_INTEL_STDCXX0X -#endif -#if defined(_MSC_VER) && (_MSC_VER >= 1600) -# define BOOST_INTEL_STDCXX0X -#endif - -#ifdef __GNUC__ -# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) -#endif - -#if !defined(BOOST_COMPILER) -# if defined(BOOST_INTEL_STDCXX0X) -# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) -# else -# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) -# endif -#endif - -#define BOOST_INTEL BOOST_INTEL_CXX_VERSION - -#if defined(_WIN32) || defined(_WIN64) -# define BOOST_INTEL_WIN BOOST_INTEL -#else -# define BOOST_INTEL_LINUX BOOST_INTEL -#endif - -#if (BOOST_INTEL_CXX_VERSION <= 600) - -# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov) - -// Boost libraries assume strong standard conformance unless otherwise -// indicated by a config macro. As configured by Intel, the EDG front-end -// requires certain compiler options be set to achieve that strong conformance. -// Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt) -// and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for -// details as they apply to particular versions of the compiler. When the -// compiler does not predefine a macro indicating if an option has been set, -// this config file simply assumes the option has been set. -// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if -// the compiler option is not enabled. - -# define BOOST_NO_SWPRINTF -# endif - -// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov) - -# if defined(_MSC_VER) && (_MSC_VER <= 1200) -# define BOOST_NO_VOID_RETURNS -# define BOOST_NO_INTEGRAL_INT64_T -# endif - -#endif - -#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32) -# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS -#endif - -// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864 -#if BOOST_INTEL_CXX_VERSION < 600 -# define BOOST_NO_INTRINSIC_WCHAR_T -#else -// We should test the macro _WCHAR_T_DEFINED to check if the compiler -// supports wchar_t natively. *BUT* there is a problem here: the standard -// headers define this macro if they typedef wchar_t. Anyway, we're lucky -// because they define it without a value, while Intel C++ defines it -// to 1. So we can check its value to see if the macro was defined natively -// or not. -// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T -// is used instead. -# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0) -# define BOOST_NO_INTRINSIC_WCHAR_T -# endif -#endif - -#if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) -// -// Figure out when Intel is emulating this gcc bug -// (All Intel versions prior to 9.0.26, and versions -// later than that if they are set up to emulate gcc 3.2 -// or earlier): -// -# if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912) -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -# endif -#endif -#if (defined(__GNUC__) && (__GNUC__ < 4)) || (defined(_WIN32) && (BOOST_INTEL_CXX_VERSION <= 1200)) || (BOOST_INTEL_CXX_VERSION <= 1200) -// GCC or VC emulation: -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#endif -// -// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T -// set correctly, if we don't do this now, we will get errors later -// in type_traits code among other things, getting this correct -// for the Intel compiler is actually remarkably fragile and tricky: -// -#ifdef __cplusplus -#if defined(BOOST_NO_INTRINSIC_WCHAR_T) -#include -template< typename T > struct assert_no_intrinsic_wchar_t; -template<> struct assert_no_intrinsic_wchar_t { typedef void type; }; -// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T -// where it is defined above: -typedef assert_no_intrinsic_wchar_t::type assert_no_intrinsic_wchar_t_; -#else -template< typename T > struct assert_intrinsic_wchar_t; -template<> struct assert_intrinsic_wchar_t {}; -// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line: -template<> struct assert_intrinsic_wchar_t {}; -#endif -#endif - -#if defined(_MSC_VER) && (_MSC_VER+0 >= 1000) -# if _MSC_VER >= 1200 -# define BOOST_HAS_MS_INT64 -# endif -# define BOOST_NO_SWPRINTF -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#elif defined(_WIN32) -# define BOOST_DISABLE_WIN32 -#endif - -// I checked version 6.0 build 020312Z, it implements the NRVO. -// Correct this as you find out which version of the compiler -// implemented the NRVO first. (Daniel Frey) -#if (BOOST_INTEL_CXX_VERSION >= 600) -# define BOOST_HAS_NRVO -#endif - -// Branch prediction hints -// I'm not sure 8.0 was the first version to support these builtins, -// update the condition if the version is not accurate. (Andrey Semashev) -#if defined(__GNUC__) && BOOST_INTEL_CXX_VERSION >= 800 -#define BOOST_LIKELY(x) __builtin_expect(x, 1) -#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) -#endif - -// RTTI -// __RTTI is the EDG macro -// __INTEL_RTTI__ is the Intel macro -// __GXX_RTTI is the g++ macro -// _CPPRTTI is the MSVC++ macro -#if !defined(__RTTI) && !defined(__INTEL_RTTI__) && !defined(__GXX_RTTI) && !defined(_CPPRTTI) - -#if !defined(BOOST_NO_RTTI) -# define BOOST_NO_RTTI -#endif - -// in MS mode, static typeid works even when RTTI is off -#if !defined(_MSC_VER) && !defined(BOOST_NO_TYPEID) -# define BOOST_NO_TYPEID -#endif - -#endif - -// -// versions check: -// we don't support Intel prior to version 6.0: -#if BOOST_INTEL_CXX_VERSION < 600 -# error "Compiler not supported or configured - please reconfigure" -#endif - -// Intel on MacOS requires -#if defined(__APPLE__) && defined(__INTEL_COMPILER) -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#endif - -// Intel on Altix Itanium -#if defined(__itanium__) && defined(__INTEL_COMPILER) -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#endif - -// -// An attempt to value-initialize a pointer-to-member may trigger an -// internal error on Intel <= 11.1 (last checked version), as was -// reported by John Maddock, Intel support issue 589832, May 2010. -// Moreover, according to test results from Huang-Vista-x86_32_intel, -// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some -// cases when it should be value-initialized. -// (Niels Dekker, LKEB, May 2010) -// Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression). -#if defined(__INTEL_COMPILER) -# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1600)) -# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -# endif -#endif - -// -// Dynamic shared object (DSO) and dynamic-link library (DLL) support -// -#if defined(__GNUC__) && (__GNUC__ >= 4) -# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) -# define BOOST_SYMBOL_IMPORT -# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) -#endif -// -// C++0x features -// For each feature we need to check both the Intel compiler version, -// and the version of MSVC or GCC that we are emulating. -// See http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ -// for a list of which features were implemented in which Intel releases. -// -#if defined(BOOST_INTEL_STDCXX0X) -// BOOST_NO_CXX11_CONSTEXPR: -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && !defined(_MSC_VER) -// Available in earlier Intel versions, but fail our tests: -# undef BOOST_NO_CXX11_CONSTEXPR -#endif -// BOOST_NO_CXX11_NULLPTR: -#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_NULLPTR -#endif -// BOOST_NO_CXX11_TEMPLATE_ALIASES -#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_TEMPLATE_ALIASES -#endif - -// BOOST_NO_CXX11_DECLTYPE -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_DECLTYPE -#endif - -// BOOST_NO_CXX11_DECLTYPE_N3276 -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_DECLTYPE_N3276 -#endif - -// BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#endif - -// BOOST_NO_CXX11_RVALUE_REFERENCES -#if (BOOST_INTEL_CXX_VERSION >= 1300) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -// This is available from earlier Intel versions, but breaks Filesystem and other libraries: -# undef BOOST_NO_CXX11_RVALUE_REFERENCES -#endif - -// BOOST_NO_CXX11_STATIC_ASSERT -#if (BOOST_INTEL_CXX_VERSION >= 1110) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_STATIC_ASSERT -#endif - -// BOOST_NO_CXX11_VARIADIC_TEMPLATES -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif - -// BOOST_NO_CXX11_VARIADIC_MACROS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40200)) && (!defined(_MSC_VER) || (_MSC_VER >= 1400)) -# undef BOOST_NO_CXX11_VARIADIC_MACROS -#endif - -// BOOST_NO_CXX11_AUTO_DECLARATIONS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_AUTO_DECLARATIONS -#endif - -// BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#endif - -// BOOST_NO_CXX11_CHAR16_T -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -# undef BOOST_NO_CXX11_CHAR16_T -#endif - -// BOOST_NO_CXX11_CHAR32_T -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -# undef BOOST_NO_CXX11_CHAR32_T -#endif - -// BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#endif - -// BOOST_NO_CXX11_DELETED_FUNCTIONS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_DELETED_FUNCTIONS -#endif - -// BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) -# undef BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif - -// BOOST_NO_CXX11_SCOPED_ENUMS -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40501)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) -// This is available but broken in earlier Intel releases. -# undef BOOST_NO_CXX11_SCOPED_ENUMS -#endif - -// BOOST_NO_SFINAE_EXPR -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -# undef BOOST_NO_SFINAE_EXPR -#endif - -// BOOST_NO_CXX11_SFINAE_EXPR -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && !defined(_MSC_VER) -# undef BOOST_NO_CXX11_SFINAE_EXPR -#endif - -// BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -// This is available in earlier Intel releases, but breaks Multiprecision: -# undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif - -// BOOST_NO_CXX11_LAMBDAS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_LAMBDAS -#endif - -// BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) -# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#endif - -// BOOST_NO_CXX11_RANGE_BASED_FOR -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) -# undef BOOST_NO_CXX11_RANGE_BASED_FOR -#endif - -// BOOST_NO_CXX11_RAW_LITERALS -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_RAW_LITERALS -#endif - -// BOOST_NO_CXX11_UNICODE_LITERALS -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -# undef BOOST_NO_CXX11_UNICODE_LITERALS -#endif - -// BOOST_NO_CXX11_NOEXCEPT -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -// Available in earlier Intel release, but generates errors when used with -// conditional exception specifications, for example in multiprecision: -# undef BOOST_NO_CXX11_NOEXCEPT -#endif - -// BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -# undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#endif - -// BOOST_NO_CXX11_USER_DEFINED_LITERALS -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) -# undef BOOST_NO_CXX11_USER_DEFINED_LITERALS -#endif - -// BOOST_NO_CXX11_ALIGNAS -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) -# undef BOOST_NO_CXX11_ALIGNAS -#endif - -// BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#endif - -// BOOST_NO_CXX11_INLINE_NAMESPACES -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) -# undef BOOST_NO_CXX11_INLINE_NAMESPACES -#endif - -// BOOST_NO_CXX11_REF_QUALIFIERS -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) -# undef BOOST_NO_CXX11_REF_QUALIFIERS -#endif - -// BOOST_NO_CXX11_FINAL -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) -# undef BOOST_NO_CXX11_FINAL -#endif - -#endif // defined(BOOST_INTEL_STDCXX0X) - -// -// Broken in all versions up to 15: -#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS - -#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION <= 1310) -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif - -#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION == 1400) -// A regression in Intel's compiler means that seems to be broken in this release as well as : -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_TUPLE -#endif - -#if (BOOST_INTEL_CXX_VERSION < 1200) -// -// fenv.h appears not to work with Intel prior to 12.0: -// -# define BOOST_NO_FENV_H -#endif - -// Intel 13.10 fails to access defaulted functions of a base class declared in private or protected sections, -// producing the following errors: -// error #453: protected function "..." (declared at ...") is not accessible through a "..." pointer or object -#if (BOOST_INTEL_CXX_VERSION <= 1310) -# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS -#endif - -#if defined(_MSC_VER) && (_MSC_VER >= 1600) -# define BOOST_HAS_STDINT_H -#endif - -#if defined(__CUDACC__) -# if defined(BOOST_GCC_CXX11) -# define BOOST_NVCC_CXX11 -# else -# define BOOST_NVCC_CXX03 -# endif -#endif - -#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(BOOST_NVCC_CXX03) -# define BOOST_HAS_INT128 -#endif - -#endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) -// -// last known and checked version: -#if (BOOST_INTEL_CXX_VERSION > 1700) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# elif defined(_MSC_VER) -// -// We don't emit this warning any more, since we have so few -// defect macros set anyway (just the one). -// -//# pragma message("Unknown compiler version - please run the configure tests and report the results") -# endif -#endif - diff --git a/native_client/boost_locale/boost/config/compiler/kai.hpp b/native_client/boost_locale/boost/config/compiler/kai.hpp deleted file mode 100644 index 960d501c86..0000000000 --- a/native_client/boost_locale/boost/config/compiler/kai.hpp +++ /dev/null @@ -1,33 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright David Abrahams 2002. -// (C) Copyright Aleksey Gurtovoy 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Kai C++ compiler setup: - -#include - -# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG) - // at least on Sun, the contents of is not in namespace std -# define BOOST_NO_STDC_NAMESPACE -# endif - -// see also common_edg.hpp which needs a special check for __KCC -# if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -# endif - -// -// last known and checked version is 4001: -#if (__KCC_VERSION > 4001) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - - - diff --git a/native_client/boost_locale/boost/config/compiler/metrowerks.hpp b/native_client/boost_locale/boost/config/compiler/metrowerks.hpp deleted file mode 100644 index 99ff0f5eea..0000000000 --- a/native_client/boost_locale/boost/config/compiler/metrowerks.hpp +++ /dev/null @@ -1,192 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Darin Adler 2001. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright David Abrahams 2001 - 2002. -// (C) Copyright Beman Dawes 2001 - 2003. -// (C) Copyright Stefan Slapeta 2004. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Metrowerks C++ compiler setup: - -// locale support is disabled when linking with the dynamic runtime -# ifdef _MSL_NO_LOCALE -# define BOOST_NO_STD_LOCALE -# endif - -# if __MWERKS__ <= 0x2301 // 5.3 -# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING -# define BOOST_NO_POINTER_TO_MEMBER_CONST -# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS -# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD -# endif - -# if __MWERKS__ <= 0x2401 // 6.2 -//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING -# endif - -# if(__MWERKS__ <= 0x2407) // 7.x -# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS -# define BOOST_NO_UNREACHABLE_RETURN_DETECTION -# endif - -# if(__MWERKS__ <= 0x3003) // 8.x -# define BOOST_NO_SFINAE -# endif - -// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last -// tested version *only*: -# if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6 -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# define BOOST_NO_IS_ABSTRACT -# endif - -#if !__option(wchar_type) -# define BOOST_NO_INTRINSIC_WCHAR_T -#endif - -#if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif - -#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh) -# if __MWERKS__ == 0x3000 -# define BOOST_COMPILER_VERSION 8.0 -# elif __MWERKS__ == 0x3001 -# define BOOST_COMPILER_VERSION 8.1 -# elif __MWERKS__ == 0x3002 -# define BOOST_COMPILER_VERSION 8.2 -# elif __MWERKS__ == 0x3003 -# define BOOST_COMPILER_VERSION 8.3 -# elif __MWERKS__ == 0x3200 -# define BOOST_COMPILER_VERSION 9.0 -# elif __MWERKS__ == 0x3201 -# define BOOST_COMPILER_VERSION 9.1 -# elif __MWERKS__ == 0x3202 -# define BOOST_COMPILER_VERSION 9.2 -# elif __MWERKS__ == 0x3204 -# define BOOST_COMPILER_VERSION 9.3 -# elif __MWERKS__ == 0x3205 -# define BOOST_COMPILER_VERSION 9.4 -# elif __MWERKS__ == 0x3206 -# define BOOST_COMPILER_VERSION 9.5 -# elif __MWERKS__ == 0x3207 -# define BOOST_COMPILER_VERSION 9.6 -# else -# define BOOST_COMPILER_VERSION __MWERKS__ -# endif -#else -# define BOOST_COMPILER_VERSION __MWERKS__ -#endif - -// -// C++0x features -// -// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG -// -#if __MWERKS__ > 0x3206 && __option(rvalue_refs) -# define BOOST_HAS_RVALUE_REFS -#else -# define BOOST_NO_CXX11_RVALUE_REFERENCES -#endif -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_CHAR32_T -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_EXTERN_TEMPLATE -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_SFINAE_EXPR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_VARIADIC_MACROS -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL -#define BOOST_NO_CXX11_THREAD_LOCAL - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif - -#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) - -// -// versions check: -// we don't support Metrowerks prior to version 5.3: -#if __MWERKS__ < 0x2301 -# error "Compiler not supported or configured - please reconfigure" -#endif -// -// last known and checked version: -#if (__MWERKS__ > 0x3205) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - - - - - - - diff --git a/native_client/boost_locale/boost/config/compiler/mpw.hpp b/native_client/boost_locale/boost/config/compiler/mpw.hpp deleted file mode 100644 index d9544345ac..0000000000 --- a/native_client/boost_locale/boost/config/compiler/mpw.hpp +++ /dev/null @@ -1,134 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// (C) Copyright Aleksey Gurtovoy 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// MPW C++ compilers setup: - -# if defined(__SC__) -# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__) -# elif defined(__MRC__) -# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__) -# else -# error "Using MPW compiler configuration by mistake. Please update." -# endif - -// -// MPW 8.90: -// -#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG) -# define BOOST_NO_CV_SPECIALIZATIONS -# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS -# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION -# define BOOST_NO_INTRINSIC_WCHAR_T -# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# define BOOST_NO_USING_TEMPLATE - -# define BOOST_NO_CWCHAR -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS - -# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */ - -#endif - -// -// C++0x features -// -// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG -// -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_CHAR32_T -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_EXTERN_TEMPLATE -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_RVALUE_REFERENCES -#define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_SFINAE_EXPR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_VARIADIC_MACROS -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL -#define BOOST_NO_CXX11_THREAD_LOCAL - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif - -// -// versions check: -// we don't support MPW prior to version 8.9: -#if MPW_CPLUS < 0x890 -# error "Compiler not supported or configured - please reconfigure" -#endif -// -// last known and checked version is 0x890: -#if (MPW_CPLUS > 0x890) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - - diff --git a/native_client/boost_locale/boost/config/compiler/nvcc.hpp b/native_client/boost_locale/boost/config/compiler/nvcc.hpp deleted file mode 100644 index f21b9b54fe..0000000000 --- a/native_client/boost_locale/boost/config/compiler/nvcc.hpp +++ /dev/null @@ -1,58 +0,0 @@ -// (C) Copyright Eric Jourdanneau, Joel Falcou 2010 -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// NVIDIA CUDA C++ compiler setup - -#ifndef BOOST_COMPILER -# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" -#endif - -#if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__) -# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__ -#else -// We don't really know what the CUDA version is, but it's definitely before 7.5: -# define BOOST_CUDA_VERSION 7000000 -#endif - -// NVIDIA Specific support -// BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device -#define BOOST_GPU_ENABLED __host__ __device__ - -// A bug in version 7.0 of CUDA prevents use of variadic templates in some occasions -// https://svn.boost.org/trac/boost/ticket/11897 -// This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance -// check is enough to detect versions < 7.5 -#if BOOST_CUDA_VERSION < 7050000 -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif -// The same bug is back again in 8.0: -#if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000) -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif -// Most recent CUDA (8.0) has no constexpr support in msvc mode: -#if defined(_MSC_VER) -# define BOOST_NO_CXX11_CONSTEXPR -#endif - -#ifdef __CUDACC__ -// -// When compiing .cu files, there's a bunch of stuff that doesn't work with msvc: -// -#if defined(_MSC_VER) -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -# define BOOST_NO_CXX11_UNICODE_LITERALS -#endif -// -// And this one effects the NVCC front end, -// See https://svn.boost.org/trac/boost/ticket/13049 -// -#if (BOOST_CUDA_VERSION >= 8000000) && (BOOST_CUDA_VERSION < 8010000) -# define BOOST_NO_CXX11_NOEXCEPT -#endif - -#endif - diff --git a/native_client/boost_locale/boost/config/compiler/pathscale.hpp b/native_client/boost_locale/boost/config/compiler/pathscale.hpp deleted file mode 100644 index 94b3f91d07..0000000000 --- a/native_client/boost_locale/boost/config/compiler/pathscale.hpp +++ /dev/null @@ -1,132 +0,0 @@ -// (C) Copyright Bryce Lelbach 2011 - -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// PathScale EKOPath C++ Compiler - -#ifndef BOOST_COMPILER -# define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__ -#endif - -#if __PATHCC__ >= 6 -// PathCC is based on clang, and supports the __has_*() builtins used -// to detect features in clang.hpp. Since the clang toolset is much -// better maintained, it is more convenient to reuse its definitions. -# include "boost/config/compiler/clang.hpp" -#elif __PATHCC__ >= 4 -# define BOOST_MSVC6_MEMBER_TEMPLATES -# define BOOST_HAS_UNISTD_H -# define BOOST_HAS_STDINT_H -# define BOOST_HAS_SIGACTION -# define BOOST_HAS_SCHED_YIELD -# define BOOST_HAS_THREADS -# define BOOST_HAS_PTHREADS -# define BOOST_HAS_PTHREAD_YIELD -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_PARTIAL_STD_ALLOCATOR -# define BOOST_HAS_NRVO -# define BOOST_HAS_NL_TYPES_H -# define BOOST_HAS_NANOSLEEP -# define BOOST_HAS_LONG_LONG -# define BOOST_HAS_LOG1P -# define BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_EXPM1 -# define BOOST_HAS_DIRENT_H -# define BOOST_HAS_CLOCK_GETTIME -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -# define BOOST_NO_CXX11_UNICODE_LITERALS -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -# define BOOST_NO_CXX11_STATIC_ASSERT -# define BOOST_NO_SFINAE_EXPR -# define BOOST_NO_CXX11_SFINAE_EXPR -# define BOOST_NO_CXX11_SCOPED_ENUMS -# define BOOST_NO_CXX11_RVALUE_REFERENCES -# define BOOST_NO_CXX11_RANGE_BASED_FOR -# define BOOST_NO_CXX11_RAW_LITERALS -# define BOOST_NO_CXX11_NULLPTR -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_NOEXCEPT -# define BOOST_NO_CXX11_LAMBDAS -# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_NO_CXX11_DECLTYPE -# define BOOST_NO_CXX11_DECLTYPE_N3276 -# define BOOST_NO_CXX11_CONSTEXPR -# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -# define BOOST_NO_CXX11_CHAR32_T -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_FORWARD_LIST -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_USER_DEFINED_LITERALS -# define BOOST_NO_CXX11_ALIGNAS -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -# define BOOST_NO_CXX11_INLINE_NAMESPACES -# define BOOST_NO_CXX11_REF_QUALIFIERS -# define BOOST_NO_CXX11_FINAL -# define BOOST_NO_CXX11_THREAD_LOCAL - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif -#endif diff --git a/native_client/boost_locale/boost/config/compiler/pgi.hpp b/native_client/boost_locale/boost/config/compiler/pgi.hpp deleted file mode 100644 index 4c402ba0d6..0000000000 --- a/native_client/boost_locale/boost/config/compiler/pgi.hpp +++ /dev/null @@ -1,168 +0,0 @@ -// (C) Copyright Noel Belcourt 2007. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// PGI C++ compiler setup: - -#define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__ -#define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) - -// -// Threading support: -// Turn this on unconditionally here, it will get turned off again later -// if no threading API is detected. -// - -#if __PGIC__ >= 11 - -// options requested by configure --enable-test -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_THREADS -#define BOOST_HAS_PTHREAD_YIELD -#define BOOST_HAS_NRVO -#define BOOST_HAS_LONG_LONG - -// options --enable-test wants undefined -#undef BOOST_NO_STDC_NAMESPACE -#undef BOOST_NO_EXCEPTION_STD_NAMESPACE -#undef BOOST_DEDUCED_TYPENAME - -#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_AUTO_DECLARATIONS - -#elif __PGIC__ >= 10 - -// options requested by configure --enable-test -#define BOOST_HAS_THREADS -#define BOOST_HAS_NRVO -#define BOOST_HAS_LONG_LONG -#if defined(linux) || defined(__linux) || defined(__linux__) -# define BOOST_HAS_STDINT_H -#endif - -// options --enable-test wants undefined -#undef BOOST_NO_STDC_NAMESPACE -#undef BOOST_NO_EXCEPTION_STD_NAMESPACE -#undef BOOST_DEDUCED_TYPENAME - -#elif __PGIC__ >= 7 - -#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_SWPRINTF -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_AUTO_DECLARATIONS - -#else - -# error "Pgi compiler not configured - please reconfigure" - -#endif -// -// C++0x features -// -// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG -// -#define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_CHAR32_T -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_EXTERN_TEMPLATE -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_NUMERIC_LIMITS -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_RVALUE_REFERENCES -#define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_SFINAE_EXPR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_SWPRINTF -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_VARIADIC_MACROS -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX - -#define BOOST_NO_CXX11_HDR_UNORDERED_SET -#define BOOST_NO_CXX11_HDR_UNORDERED_MAP -#define BOOST_NO_CXX11_HDR_TYPEINDEX -#define BOOST_NO_CXX11_HDR_TYPE_TRAITS -#define BOOST_NO_CXX11_HDR_TUPLE -#define BOOST_NO_CXX11_HDR_THREAD -#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -#define BOOST_NO_CXX11_HDR_REGEX -#define BOOST_NO_CXX11_HDR_RATIO -#define BOOST_NO_CXX11_HDR_RANDOM -#define BOOST_NO_CXX11_HDR_MUTEX -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_HDR_FUTURE -#define BOOST_NO_CXX11_HDR_FORWARD_LIST -#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -#define BOOST_NO_CXX11_HDR_CODECVT -#define BOOST_NO_CXX11_HDR_CHRONO -#define BOOST_NO_CXX11_HDR_ARRAY -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL -#define BOOST_NO_CXX11_THREAD_LOCAL - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif -// -// version check: -// probably nothing to do here? - diff --git a/native_client/boost_locale/boost/config/compiler/sgi_mipspro.hpp b/native_client/boost_locale/boost/config/compiler/sgi_mipspro.hpp deleted file mode 100644 index 54433c9978..0000000000 --- a/native_client/boost_locale/boost/config/compiler/sgi_mipspro.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// SGI C++ compiler setup: - -#define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) - -#include - -// -// Threading support: -// Turn this on unconditionally here, it will get turned off again later -// if no threading API is detected. -// -#define BOOST_HAS_THREADS -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP - -#undef BOOST_NO_SWPRINTF -#undef BOOST_DEDUCED_TYPENAME - -// -// version check: -// probably nothing to do here? - - diff --git a/native_client/boost_locale/boost/config/compiler/sunpro_cc.hpp b/native_client/boost_locale/boost/config/compiler/sunpro_cc.hpp deleted file mode 100644 index 2453e7cfc1..0000000000 --- a/native_client/boost_locale/boost/config/compiler/sunpro_cc.hpp +++ /dev/null @@ -1,210 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright Peter Dimov 2002. -// (C) Copyright Aleksey Gurtovoy 2002 - 2003. -// (C) Copyright David Abrahams 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Sun C++ compiler setup: - -# if __SUNPRO_CC <= 0x500 -# define BOOST_NO_MEMBER_TEMPLATES -# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING -# endif - -# if (__SUNPRO_CC <= 0x520) - // - // Sunpro 5.2 and earler: - // - // although sunpro 5.2 supports the syntax for - // inline initialization it often gets the value - // wrong, especially where the value is computed - // from other constants (J Maddock 6th May 2001) -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION - - // Although sunpro 5.2 supports the syntax for - // partial specialization, it often seems to - // bind to the wrong specialization. Better - // to disable it until suppport becomes more stable - // (J Maddock 6th May 2001). -# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# endif - -# if (__SUNPRO_CC <= 0x530) - // Requesting debug info (-g) with Boost.Python results - // in an internal compiler error for "static const" - // initialized in-class. - // >> Assertion: (../links/dbg_cstabs.cc, line 611) - // while processing ../test.cpp at line 0. - // (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002) -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION - - // SunPro 5.3 has better support for partial specialization, - // but breaks when compiling std::less > - // (Jens Maurer 4 Nov 2001). - - // std::less specialization fixed as reported by George - // Heintzelman; partial specialization re-enabled - // (Peter Dimov 17 Jan 2002) - -//# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - // integral constant expressions with 64 bit numbers fail -# define BOOST_NO_INTEGRAL_INT64_T -# endif - -# if (__SUNPRO_CC < 0x570) -# define BOOST_NO_TEMPLATE_TEMPLATES - // see http://lists.boost.org/MailArchives/boost/msg47184.php - // and http://lists.boost.org/MailArchives/boost/msg47220.php -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION -# define BOOST_NO_SFINAE -# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS -# endif -# if (__SUNPRO_CC <= 0x580) -# define BOOST_NO_IS_ABSTRACT -# endif - -# if (__SUNPRO_CC <= 0x5100) - // Sun 5.10 may not correctly value-initialize objects of - // some user defined types, as was reported in April 2010 - // (CR 6947016), and confirmed by Steve Clamage. - // (Niels Dekker, LKEB, May 2010). -# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -# endif - -// -// Dynamic shared object (DSO) and dynamic-link library (DLL) support -// -#if __SUNPRO_CC > 0x500 -# define BOOST_SYMBOL_EXPORT __global -# define BOOST_SYMBOL_IMPORT __global -# define BOOST_SYMBOL_VISIBLE __global -#endif - -#if (__SUNPRO_CC < 0x5130) -// C++03 features in 12.4: -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_ADL_BARRIER -#define BOOST_NO_CXX11_VARIADIC_MACROS -#endif - -#if (__SUNPRO_CC < 0x5130) || (__cplusplus < 201100) -// C++11 only featuires in 12.4: -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_CHAR32_T -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_EXTERN_TEMPLATE -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_RVALUE_REFERENCES -#define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_FINAL -#endif - -#if (__SUNPRO_CC < 0x5140) || (__cplusplus < 201103) -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_THREAD_LOCAL -#endif - -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -// -// C++0x features -// -# define BOOST_HAS_LONG_LONG - -#define BOOST_NO_CXX11_SFINAE_EXPR - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) || (__cplusplus < 201402L) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif - -// Turn on threading support for Solaris 12. -// Ticket #11972 -#if (__SUNPRO_CC >= 0x5140) && defined(__SunOS_5_12) && !defined(BOOST_HAS_THREADS) -# define BOOST_HAS_THREADS -#endif - -// -// Version -// - -#define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC) - -// -// versions check: -// we don't support sunpro prior to version 4: -#if __SUNPRO_CC < 0x400 -#error "Compiler not supported or configured - please reconfigure" -#endif -// -// last known and checked version is 0x590: -#if (__SUNPRO_CC > 0x590) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif diff --git a/native_client/boost_locale/boost/config/compiler/vacpp.hpp b/native_client/boost_locale/boost/config/compiler/vacpp.hpp deleted file mode 100644 index 683c167dbf..0000000000 --- a/native_client/boost_locale/boost/config/compiler/vacpp.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Toon Knapen 2001 - 2003. -// (C) Copyright Lie-Quan Lee 2001. -// (C) Copyright Markus Schoepflin 2002 - 2003. -// (C) Copyright Beman Dawes 2002 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Visual Age (IBM) C++ compiler setup: - -#if __IBMCPP__ <= 501 -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS -#endif - -#if (__IBMCPP__ <= 502) -// Actually the compiler supports inclass member initialization but it -// requires a definition for the class member and it doesn't recognize -// it as an integral constant expression when used as a template argument. -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION -# define BOOST_NO_INTEGRAL_INT64_T -# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD -#endif - -#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG) -# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS -#endif - -#if (__IBMCPP__ <= 1110) -// XL C++ V11.1 and earlier versions may not always value-initialize -// a temporary object T(), when T is a non-POD aggregate class type. -// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it -// high priority. -- Niels Dekker (LKEB), May 2010. -# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#endif - -// -// On AIX thread support seems to be indicated by _THREAD_SAFE: -// -#ifdef _THREAD_SAFE -# define BOOST_HAS_THREADS -#endif - -#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__) - -// -// versions check: -// we don't support Visual age prior to version 5: -#if __IBMCPP__ < 500 -#error "Compiler not supported or configured - please reconfigure" -#endif -// -// last known and checked version is 1210: -#if (__IBMCPP__ > 1210) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - -// Some versions of the compiler have issues with default arguments on partial specializations -#if __IBMCPP__ <= 1010 -#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS -#endif - -// -// C++0x features -// -// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG -// -#if ! __IBMCPP_AUTO_TYPEDEDUCTION -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#endif -#if ! __IBMCPP_UTF_LITERAL__ -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -#endif -#if ! __IBMCPP_CONSTEXPR -# define BOOST_NO_CXX11_CONSTEXPR -#endif -#if ! __IBMCPP_DECLTYPE -# define BOOST_NO_CXX11_DECLTYPE -#else -# define BOOST_HAS_DECLTYPE -#endif -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#if ! __IBMCPP_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif -#if ! __IBMCPP_EXTERN_TEMPLATE -# define BOOST_NO_CXX11_EXTERN_TEMPLATE -#endif -#if ! __IBMCPP_VARIADIC_TEMPLATES -// not enabled separately at this time -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#endif -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#if ! __IBMCPP_RVALUE_REFERENCES -# define BOOST_NO_CXX11_RVALUE_REFERENCES -#endif -#if ! __IBMCPP_SCOPED_ENUM -# define BOOST_NO_CXX11_SCOPED_ENUMS -#endif -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_SFINAE_EXPR -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#if ! __IBMCPP_STATIC_ASSERT -# define BOOST_NO_CXX11_STATIC_ASSERT -#endif -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#if ! __IBMCPP_VARIADIC_TEMPLATES -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif -#if ! __C99_MACRO_WITH_VA_ARGS -# define BOOST_NO_CXX11_VARIADIC_MACROS -#endif -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL -#define BOOST_NO_CXX11_THREAD_LOCAL - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -// C++17 -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif -#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) -# define BOOST_NO_CXX17_INLINE_VARIABLES -#endif -#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif diff --git a/native_client/boost_locale/boost/config/compiler/visualc.hpp b/native_client/boost_locale/boost/config/compiler/visualc.hpp deleted file mode 100644 index 7df92ba31b..0000000000 --- a/native_client/boost_locale/boost/config/compiler/visualc.hpp +++ /dev/null @@ -1,336 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001 - 2002. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright Aleksey Gurtovoy 2002. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Beman Dawes 2002 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. -// -// Microsoft Visual C++ compiler setup: -// -// We need to be careful with the checks in this file, as contrary -// to popular belief there are versions with _MSC_VER with the final -// digit non-zero (mainly the MIPS cross compiler). -// -// So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX. -// No other comparisons (==, >, or <=) are safe. -// - -#define BOOST_MSVC _MSC_VER - -// -// Helper macro BOOST_MSVC_FULL_VER for use in Boost code: -// -#if _MSC_FULL_VER > 100000000 -# define BOOST_MSVC_FULL_VER _MSC_FULL_VER -#else -# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10) -#endif - -// Attempt to suppress VC6 warnings about the length of decorated names (obsolete): -#pragma warning( disable : 4503 ) // warning: decorated name length exceeded - -#define BOOST_HAS_PRAGMA_ONCE - -// -// versions check: -// we don't support Visual C++ prior to version 7.1: -#if _MSC_VER < 1310 -# error "Compiler not supported or configured - please reconfigure" -#endif - -#if _MSC_FULL_VER < 180020827 -# define BOOST_NO_FENV_H -#endif - -#if _MSC_VER < 1400 -// although a conforming signature for swprint exists in VC7.1 -// it appears not to actually work: -# define BOOST_NO_SWPRINTF -// Our extern template tests also fail for this compiler: -# define BOOST_NO_CXX11_EXTERN_TEMPLATE -// Variadic macros do not exist for VC7.1 and lower -# define BOOST_NO_CXX11_VARIADIC_MACROS -# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#endif - -#if _MSC_VER < 1500 // 140X == VC++ 8.0 -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -#endif - -#if _MSC_VER < 1600 // 150X == VC++ 9.0 - // A bug in VC9: -# define BOOST_NO_ADL_BARRIER -#endif - - -#ifndef _NATIVE_WCHAR_T_DEFINED -# define BOOST_NO_INTRINSIC_WCHAR_T -#endif - -// -// check for exception handling support: -#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif - -// -// __int64 support: -// -#define BOOST_HAS_MS_INT64 -#if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400) -# define BOOST_HAS_LONG_LONG -#else -# define BOOST_NO_LONG_LONG -#endif -#if (_MSC_VER >= 1400) && !defined(_DEBUG) -# define BOOST_HAS_NRVO -#endif -#if _MSC_VER >= 1600 // 160X == VC++ 10.0 -# define BOOST_HAS_PRAGMA_DETECT_MISMATCH -#endif -// -// disable Win32 API's if compiler extensions are -// turned off: -// -#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32) -# define BOOST_DISABLE_WIN32 -#endif -#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI) -# define BOOST_NO_RTTI -#endif - -// -// TR1 features: -// -#if (_MSC_VER >= 1700) && defined(_HAS_CXX17) && (_HAS_CXX17 > 0) -// # define BOOST_HAS_TR1_HASH // don't know if this is true yet. -// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet. -# define BOOST_HAS_TR1_UNORDERED_MAP -# define BOOST_HAS_TR1_UNORDERED_SET -#endif - -// -// C++0x features -// -// See above for BOOST_NO_LONG_LONG - -// C++ features supported by VC++ 10 (aka 2010) -// -#if _MSC_VER < 1600 -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -# define BOOST_NO_CXX11_LAMBDAS -# define BOOST_NO_CXX11_RVALUE_REFERENCES -# define BOOST_NO_CXX11_STATIC_ASSERT -# define BOOST_NO_CXX11_NULLPTR -# define BOOST_NO_CXX11_DECLTYPE -#endif // _MSC_VER < 1600 - -#if _MSC_VER >= 1600 -# define BOOST_HAS_STDINT_H -#endif - -// C++11 features supported by VC++ 11 (aka 2012) -// -#if _MSC_VER < 1700 -# define BOOST_NO_CXX11_FINAL -# define BOOST_NO_CXX11_RANGE_BASED_FOR -# define BOOST_NO_CXX11_SCOPED_ENUMS -#endif // _MSC_VER < 1700 - -// C++11 features supported by VC++ 12 (aka 2013). -// -#if _MSC_FULL_VER < 180020827 -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -# define BOOST_NO_CXX11_RAW_LITERALS -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -# define BOOST_NO_CXX11_DECLTYPE_N3276 -#endif - -#if _MSC_FULL_VER >= 180020827 -#define BOOST_HAS_EXPM1 -#define BOOST_HAS_LOG1P -#endif - -// C++11 features supported by VC++ 14 (aka 2015) -// -#if (_MSC_FULL_VER < 190023026) -# define BOOST_NO_CXX11_NOEXCEPT -# define BOOST_NO_CXX11_REF_QUALIFIERS -# define BOOST_NO_CXX11_USER_DEFINED_LITERALS -# define BOOST_NO_CXX11_ALIGNAS -# define BOOST_NO_CXX11_INLINE_NAMESPACES -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -# define BOOST_NO_CXX11_UNICODE_LITERALS -# define BOOST_NO_CXX14_DECLTYPE_AUTO -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -# define BOOST_NO_CXX14_BINARY_LITERALS -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -# define BOOST_NO_CXX11_THREAD_LOCAL -#endif -// C++11 features supported by VC++ 14 update 3 (aka 2015) -// -#if (_MSC_FULL_VER < 190024210) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -# define BOOST_NO_SFINAE_EXPR -# define BOOST_NO_CXX11_CONSTEXPR -#endif - -// C++14 features supported by VC++ 14.1 (Visual Studio 2017) -// -#if (_MSC_VER < 1910) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif - -// C++17 features supported by VC++ 14.1 (Visual Studio 2017) Update 3 -// -#if (_MSC_VER < 1911) || (_MSVC_LANG < 201703) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif - -// MSVC including version 14 has not yet completely -// implemented value-initialization, as is reported: -// "VC++ does not value-initialize members of derived classes without -// user-declared constructor", reported in 2009 by Sylvester Hesp: -// https://connect.microsoft.com/VisualStudio/feedback/details/484295 -// "Presence of copy constructor breaks member class initialization", -// reported in 2009 by Alex Vakulenko: -// https://connect.microsoft.com/VisualStudio/feedback/details/499606 -// "Value-initialization in new-expression", reported in 2005 by -// Pavel Kuznetsov (MetaCommunications Engineering): -// https://connect.microsoft.com/VisualStudio/feedback/details/100744 -// Reported again by John Maddock in 2015 for VC14: -// https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly -// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues -// (Niels Dekker, LKEB, May 2010) -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -// -// C++ 11: -// -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_CXX11_SFINAE_EXPR -// C++ 14: -# define BOOST_NO_CXX14_CONSTEXPR -// C++ 17: -#define BOOST_NO_CXX17_INLINE_VARIABLES -#define BOOST_NO_CXX17_FOLD_EXPRESSIONS - -// -// Things that don't work in clr mode: -// -#ifdef _M_CEE -#ifndef BOOST_NO_CXX11_THREAD_LOCAL -# define BOOST_NO_CXX11_THREAD_LOCAL -#endif -#ifndef BOOST_NO_SFINAE_EXPR -# define BOOST_NO_SFINAE_EXPR -#endif -#ifndef BOOST_NO_CXX11_REF_QUALIFIERS -# define BOOST_NO_CXX11_REF_QUALIFIERS -#endif -#endif -#ifdef _M_CEE_PURE -#ifndef BOOST_NO_CXX11_CONSTEXPR -# define BOOST_NO_CXX11_CONSTEXPR -#endif -#endif - -// -// prefix and suffix headers: -// -#ifndef BOOST_ABI_PREFIX -# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp" -#endif -#ifndef BOOST_ABI_SUFFIX -# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp" -#endif - -#ifndef BOOST_COMPILER -// TODO: -// these things are mostly bogus. 1200 means version 12.0 of the compiler. The -// artificial versions assigned to them only refer to the versions of some IDE -// these compilers have been shipped with, and even that is not all of it. Some -// were shipped with freely downloadable SDKs, others as crosscompilers in eVC. -// IOW, you can't use these 'versions' in any sensible way. Sorry. -# if defined(UNDER_CE) -# if _MSC_VER < 1400 - // Note: I'm not aware of any CE compiler with version 13xx -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown EVC++ compiler version - please run the configure tests and report the results" -# else -# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") -# endif -# elif _MSC_VER < 1500 -# define BOOST_COMPILER_VERSION evc8 -# elif _MSC_VER < 1600 -# define BOOST_COMPILER_VERSION evc9 -# elif _MSC_VER < 1700 -# define BOOST_COMPILER_VERSION evc10 -# elif _MSC_VER < 1800 -# define BOOST_COMPILER_VERSION evc11 -# elif _MSC_VER < 1900 -# define BOOST_COMPILER_VERSION evc12 -# elif _MSC_VER < 2000 -# define BOOST_COMPILER_VERSION evc14 -# else -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown EVC++ compiler version - please run the configure tests and report the results" -# else -# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") -# endif -# endif -# else -# if _MSC_VER < 1310 - // Note: Versions up to 7.0 aren't supported. -# define BOOST_COMPILER_VERSION 5.0 -# elif _MSC_VER < 1300 -# define BOOST_COMPILER_VERSION 6.0 -# elif _MSC_VER < 1310 -# define BOOST_COMPILER_VERSION 7.0 -# elif _MSC_VER < 1400 -# define BOOST_COMPILER_VERSION 7.1 -# elif _MSC_VER < 1500 -# define BOOST_COMPILER_VERSION 8.0 -# elif _MSC_VER < 1600 -# define BOOST_COMPILER_VERSION 9.0 -# elif _MSC_VER < 1700 -# define BOOST_COMPILER_VERSION 10.0 -# elif _MSC_VER < 1800 -# define BOOST_COMPILER_VERSION 11.0 -# elif _MSC_VER < 1900 -# define BOOST_COMPILER_VERSION 12.0 -# elif _MSC_VER < 1910 -# define BOOST_COMPILER_VERSION 14.0 -# elif _MSC_VER < 1920 -# define BOOST_COMPILER_VERSION 14.1 -# else -# define BOOST_COMPILER_VERSION _MSC_VER -# endif -# endif - -# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) -#endif - -// -// last known and checked version is 19.11.25506 (VC++ 2017.3): -#if (_MSC_VER > 1911) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# else -# pragma message("Unknown compiler version - please run the configure tests and report the results") -# endif -#endif diff --git a/native_client/boost_locale/boost/config/compiler/xlcpp.hpp b/native_client/boost_locale/boost/config/compiler/xlcpp.hpp deleted file mode 100644 index b267f49bad..0000000000 --- a/native_client/boost_locale/boost/config/compiler/xlcpp.hpp +++ /dev/null @@ -1,276 +0,0 @@ -// (C) Copyright Douglas Gregor 2010 -// -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// compiler setup for IBM XL C/C++ for Linux (Little Endian) based on clang. - -#define BOOST_HAS_PRAGMA_ONCE - -// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. -#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) -# define BOOST_HAS_PRAGMA_DETECT_MISMATCH -#endif - -// When compiling with clang before __has_extension was defined, -// even if one writes 'defined(__has_extension) && __has_extension(xxx)', -// clang reports a compiler error. So the only workaround found is: - -#ifndef __has_extension -#define __has_extension __has_feature -#endif - -#ifndef __has_cpp_attribute -#define __has_cpp_attribute(x) 0 -#endif - -#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif - -#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) -# define BOOST_NO_RTTI -#endif - -#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) -# define BOOST_NO_TYPEID -#endif - -#if defined(__int64) && !defined(__GNUC__) -# define BOOST_HAS_MS_INT64 -#endif - -#define BOOST_HAS_NRVO - -// Branch prediction hints -#if defined(__has_builtin) -#if __has_builtin(__builtin_expect) -#define BOOST_LIKELY(x) __builtin_expect(x, 1) -#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) -#endif -#endif - -// Clang supports "long long" in all compilation modes. -#define BOOST_HAS_LONG_LONG - -// -// Dynamic shared object (DSO) and dynamic-link library (DLL) support -// -#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) -# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) -# define BOOST_SYMBOL_IMPORT -# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) -#endif - -// -// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through -// between switch labels. -// -#if __cplusplus >= 201103L && defined(__has_warning) -# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") -# define BOOST_FALLTHROUGH [[clang::fallthrough]] -# endif -#endif - -#if !__has_feature(cxx_auto_type) -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#endif - -// -// Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t -// -#if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -#endif - -#if !__has_feature(cxx_constexpr) -# define BOOST_NO_CXX11_CONSTEXPR -#endif - -#if !__has_feature(cxx_decltype) -# define BOOST_NO_CXX11_DECLTYPE -#endif - -#if !__has_feature(cxx_decltype_incomplete_return_types) -# define BOOST_NO_CXX11_DECLTYPE_N3276 -#endif - -#if !__has_feature(cxx_defaulted_functions) -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#endif - -#if !__has_feature(cxx_deleted_functions) -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -#endif - -#if !__has_feature(cxx_explicit_conversions) -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif - -#if !__has_feature(cxx_default_function_template_args) -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#endif - -#if !__has_feature(cxx_generalized_initializers) -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif - -#if !__has_feature(cxx_lambdas) -# define BOOST_NO_CXX11_LAMBDAS -#endif - -#if !__has_feature(cxx_local_type_template_args) -# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#endif - -#if !__has_feature(cxx_noexcept) -# define BOOST_NO_CXX11_NOEXCEPT -#endif - -#if !__has_feature(cxx_nullptr) -# define BOOST_NO_CXX11_NULLPTR -#endif - -#if !__has_feature(cxx_range_for) -# define BOOST_NO_CXX11_RANGE_BASED_FOR -#endif - -#if !__has_feature(cxx_raw_string_literals) -# define BOOST_NO_CXX11_RAW_LITERALS -#endif - -#if !__has_feature(cxx_reference_qualified_functions) -# define BOOST_NO_CXX11_REF_QUALIFIERS -#endif - -#if !__has_feature(cxx_generalized_initializers) -# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#endif - -#if !__has_feature(cxx_rvalue_references) -# define BOOST_NO_CXX11_RVALUE_REFERENCES -#endif - -#if !__has_feature(cxx_strong_enums) -# define BOOST_NO_CXX11_SCOPED_ENUMS -#endif - -#if !__has_feature(cxx_static_assert) -# define BOOST_NO_CXX11_STATIC_ASSERT -#endif - -#if !__has_feature(cxx_alias_templates) -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -#endif - -#if !__has_feature(cxx_unicode_literals) -# define BOOST_NO_CXX11_UNICODE_LITERALS -#endif - -#if !__has_feature(cxx_variadic_templates) -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif - -#if !__has_feature(cxx_user_literals) -# define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#endif - -#if !__has_feature(cxx_alignas) -# define BOOST_NO_CXX11_ALIGNAS -#endif - -#if !__has_feature(cxx_trailing_return) -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#endif - -#if !__has_feature(cxx_inline_namespaces) -# define BOOST_NO_CXX11_INLINE_NAMESPACES -#endif - -#if !__has_feature(cxx_override_control) -# define BOOST_NO_CXX11_FINAL -#endif - -#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif - -#if !__has_feature(__cxx_decltype_auto__) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif - -#if !__has_feature(__cxx_aggregate_nsdmi__) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif - -#if !__has_feature(__cxx_init_captures__) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif - -#if !__has_feature(__cxx_generic_lambdas__) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif - -// clang < 3.5 has a defect with dependent type, like following. -// -// template -// constexpr typename enable_if >::type foo(T &) -// { } // error: no return statement in constexpr function -// -// This issue also affects C++11 mode, but C++11 constexpr requires return stmt. -// Therefore we don't care such case. -// -// Note that we can't check Clang version directly as the numbering system changes depending who's -// creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873) -// so instead verify that we have a feature that was introduced at the same time as working C++14 -// constexpr (generic lambda's in this case): -// -#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) -# define BOOST_NO_CXX14_CONSTEXPR -#endif - -#if !__has_feature(__cxx_return_type_deduction__) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif - -#if !__has_feature(__cxx_variable_templates__) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif - -#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) -# define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#endif - -// Clang 3.9+ in c++1z -#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L -# define BOOST_NO_CXX17_INLINE_VARIABLES -# define BOOST_NO_CXX17_FOLD_EXPRESSIONS -#endif - -#if !__has_feature(cxx_thread_local) -# define BOOST_NO_CXX11_THREAD_LOCAL -#endif - -#if __cplusplus < 201400 -// All versions with __cplusplus above this value seem to support this: -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif - - -// Unused attribute: -#if defined(__GNUC__) && (__GNUC__ >= 4) -# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) -#endif - -#ifndef BOOST_COMPILER -# define BOOST_COMPILER "Clang version " __clang_version__ -#endif - -// Macro used to identify the Clang compiler. -#define BOOST_CLANG 1 - diff --git a/native_client/boost_locale/boost/config/compiler/xlcpp_zos.hpp b/native_client/boost_locale/boost/config/compiler/xlcpp_zos.hpp deleted file mode 100644 index c554903a0b..0000000000 --- a/native_client/boost_locale/boost/config/compiler/xlcpp_zos.hpp +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 2017 Dynatrace -// -// Distributed under the Boost Software License, Version 1.0. -// See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt - -// See http://www.boost.org for most recent version. - -// Compiler setup for IBM z/OS XL C/C++ compiler. - -// Oldest compiler version currently supported is 2.1 (V2R1) -#if !defined(__IBMCPP__) || !defined(__COMPILER_VER__) || __COMPILER_VER__ < 0x42010000 -# error "Compiler not supported or configured - please reconfigure" -#endif - -#if __COMPILER_VER__ > 0x42010000 -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - -#define BOOST_COMPILER "IBM z/OS XL C/C++ version " BOOST_STRINGIZE(__COMPILER_VER__) -#define BOOST_XLCPP_ZOS __COMPILER_VER__ - -// ------------------------------------- - -#include // For __UU, __C99, __TR1, ... - -#if !defined(__IBMCPP_DEFAULTED_AND_DELETED_FUNCTIONS) -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS -#endif - -// ------------------------------------- - -#if defined(__UU) || defined(__C99) || defined(__TR1) -# define BOOST_HAS_LOG1P -# define BOOST_HAS_EXPM1 -#endif - -#if defined(__C99) || defined(__TR1) -# define BOOST_HAS_STDINT_H -#else -# define BOOST_NO_FENV_H -#endif - -// ------------------------------------- - -#define BOOST_HAS_NRVO - -#if !defined(__RTTI_ALL__) -# define BOOST_NO_RTTI -#endif - -#if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif - -#if defined(_LONG_LONG) || defined(__IBMCPP_C99_LONG_LONG) || defined(__LL) -# define BOOST_HAS_LONG_LONG -#else -# define BOOST_NO_LONG_LONG -#endif - -#if defined(_LONG_LONG) || defined(__IBMCPP_C99_LONG_LONG) || defined(__LL) || defined(_LP64) -# define BOOST_HAS_MS_INT64 -#endif - -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_SFINAE_EXPR - -#if defined(__IBMCPP_VARIADIC_TEMPLATES) -# define BOOST_HAS_VARIADIC_TMPL -#else -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#endif - -#if defined(__IBMCPP_STATIC_ASSERT) -# define BOOST_HAS_STATIC_ASSERT -#else -# define BOOST_NO_CXX11_STATIC_ASSERT -#endif - -#if defined(__IBMCPP_RVALUE_REFERENCES) -# define BOOST_HAS_RVALUE_REFS -#else -# define BOOST_NO_CXX11_RVALUE_REFERENCES -#endif - -#if !defined(__IBMCPP_SCOPED_ENUM) -# define BOOST_NO_CXX11_SCOPED_ENUMS -#endif - -#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS - -#if !defined(__IBMCPP_EXPLICIT_CONVERSION_OPERATORS) -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif - -#if !defined(__IBMCPP_DECLTYPE) -# define BOOST_NO_CXX11_DECLTYPE -#else -# define BOOST_HAS_DECLTYPE -#endif -#define BOOST_NO_CXX11_DECLTYPE_N3276 - -#if !defined(__IBMCPP_INLINE_NAMESPACE) -# define BOOST_NO_CXX11_INLINE_NAMESPACES -#endif - -#if !defined(__IBMCPP_AUTO_TYPEDEDUCTION) -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#endif - -#if !defined(__IBM_CHAR32_T__) -# define BOOST_NO_CXX11_CHAR32_T -#endif -#if !defined(__IBM_CHAR16_T__) -# define BOOST_NO_CXX11_CHAR16_T -#endif - -#if !defined(__IBMCPP_CONSTEXPR) -# define BOOST_NO_CXX11_CONSTEXPR -#endif - -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_THREAD_LOCAL -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#define BOOST_NO_CXX14_AGGREGATE_NSDMI -#define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#define BOOST_NO_CXX14_GENERIC_LAMBDAS -#define BOOST_NO_CXX14_DIGIT_SEPARATORS -#define BOOST_NO_CXX14_DECLTYPE_AUTO -#define BOOST_NO_CXX14_CONSTEXPR -#define BOOST_NO_CXX14_BINARY_LITERALS -#define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#define BOOST_NO_CXX17_INLINE_VARIABLES -#define BOOST_NO_CXX17_FOLD_EXPRESSIONS - -// ------------------------------------- - -#if defined(__IBM_ATTRIBUTES) -# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__)) -# define BOOST_NOINLINE __attribute__ ((__noinline__)) -// No BOOST_ALIGNMENT - explicit alignment support is broken (V2R1). -#endif - -extern "builtin" long __builtin_expect(long, long); - -#define BOOST_LIKELY(x) __builtin_expect((x) && true, 1) -#define BOOST_UNLIKELY(x) __builtin_expect((x) && true, 0) diff --git a/native_client/boost_locale/boost/config/detail/posix_features.hpp b/native_client/boost_locale/boost/config/detail/posix_features.hpp deleted file mode 100644 index d12954797f..0000000000 --- a/native_client/boost_locale/boost/config/detail/posix_features.hpp +++ /dev/null @@ -1,95 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - -// See http://www.boost.org for most recent version. - -// All POSIX feature tests go in this file, -// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well -// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's -// may be present but none-functional unless _POSIX_C_SOURCE and -// _XOPEN_SOURCE have been defined to the right value (it's up -// to the user to do this *before* including any header, although -// in most cases the compiler will do this for you). - -# if defined(BOOST_HAS_UNISTD_H) -# include - - // XOpen has , but is this the correct version check? -# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3) -# define BOOST_HAS_NL_TYPES_H -# endif - - // POSIX version 6 requires -# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100) -# define BOOST_HAS_STDINT_H -# endif - - // POSIX version 2 requires -# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L) -# define BOOST_HAS_DIRENT_H -# endif - - // POSIX version 3 requires to have sigaction: -# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L) -# define BOOST_HAS_SIGACTION -# endif - // POSIX defines _POSIX_THREADS > 0 for pthread support, - // however some platforms define _POSIX_THREADS without - // a value, hence the (_POSIX_THREADS+0 >= 0) check. - // Strictly speaking this may catch platforms with a - // non-functioning stub , but such occurrences should - // occur very rarely if at all. -# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS) -# define BOOST_HAS_PTHREADS -# endif - - // BOOST_HAS_NANOSLEEP: - // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME: -# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \ - || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) -# define BOOST_HAS_NANOSLEEP -# endif - - // BOOST_HAS_CLOCK_GETTIME: - // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME - // but at least one platform - linux - defines that flag without - // defining clock_gettime): -# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) -# define BOOST_HAS_CLOCK_GETTIME -# endif - - // BOOST_HAS_SCHED_YIELD: - // This is predicated on _POSIX_PRIORITY_SCHEDULING or - // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME. -# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\ - || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\ - || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) -# define BOOST_HAS_SCHED_YIELD -# endif - - // BOOST_HAS_GETTIMEOFDAY: - // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE: - // These are predicated on _XOPEN_VERSION, and appears to be first released - // in issue 4, version 2 (_XOPEN_VERSION > 500). - // Likewise for the functions log1p and expm1. -# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500) -# define BOOST_HAS_GETTIMEOFDAY -# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500) -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# endif -# ifndef BOOST_HAS_LOG1P -# define BOOST_HAS_LOG1P -# endif -# ifndef BOOST_HAS_EXPM1 -# define BOOST_HAS_EXPM1 -# endif -# endif - -# endif - - - - diff --git a/native_client/boost_locale/boost/config/detail/select_compiler_config.hpp b/native_client/boost_locale/boost/config/detail/select_compiler_config.hpp deleted file mode 100644 index 97d47c1c56..0000000000 --- a/native_client/boost_locale/boost/config/detail/select_compiler_config.hpp +++ /dev/null @@ -1,158 +0,0 @@ -// Boost compiler configuration selection header file - -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Martin Wille 2003. -// (C) Copyright Guillaume Melquiond 2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for most recent version. - -// locate which compiler we are using and define -// BOOST_COMPILER_CONFIG as needed: - -#if defined __CUDACC__ -// NVIDIA CUDA C++ compiler for GPU -# include "boost/config/compiler/nvcc.hpp" - -#endif - -#if defined(__GCCXML__) -// GCC-XML emulates other compilers, it has to appear first here! -# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp" - -#elif defined(_CRAYC) -// EDG based Cray compiler: -# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp" - -#elif defined __COMO__ -// Comeau C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" - -#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4) -// PathScale EKOPath compiler (has to come before clang and gcc) -# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp" - -#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) -// Intel -# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" - -#elif defined __clang__ && !defined(__CUDACC__) && !defined(__ibmxl__) -// when using clang and cuda at same time, you want to appear as gcc -// Clang C++ emulates GCC, so it has to appear early. -# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" - -#elif defined __DMC__ -// Digital Mars C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp" - -#elif defined __DCC__ -// Wind River Diab C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/diab.hpp" - -# elif defined(__GNUC__) && !defined(__ibmxl__) -// GNU C++: -# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp" - -#elif defined __KCC -// Kai C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp" - -#elif defined __sgi -// SGI MIPSpro C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp" - -#elif defined __DECCXX -// Compaq Tru64 Unix cxx -# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp" - -#elif defined __ghs -// Greenhills C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp" - -#elif defined __CODEGEARC__ -// CodeGear - must be checked for before Borland -# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp" - -#elif defined __BORLANDC__ -// Borland -# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp" - -#elif defined __MWERKS__ -// Metrowerks CodeWarrior -# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp" - -#elif defined __SUNPRO_CC -// Sun Workshop Compiler C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp" - -#elif defined __HP_aCC -// HP aCC -# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp" - -#elif defined(__MRC__) || defined(__SC__) -// MPW MrCpp or SCpp -# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp" - -#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__) -// IBM z/OS XL C/C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp_zos.hpp" - -#elif defined(__ibmxl__) -// IBM XL C/C++ for Linux (Little Endian) -# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp" - -#elif defined(__IBMCPP__) -// IBM Visual Age or IBM XL C/C++ for Linux (Big Endian) -# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp" - -#elif defined(__PGI) -// Portland Group Inc. -# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp" - -#elif defined _MSC_VER -// Microsoft Visual C++ -// -// Must remain the last #elif since some other vendors (Metrowerks, for -// example) also #define _MSC_VER -# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp" - -#elif defined (BOOST_ASSERT_CONFIG) -// this must come last - generate an error if we don't -// recognise the compiler: -# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)" - -#endif - -#if 0 -// -// This section allows dependency scanners to find all the headers we *might* include: -// -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif - diff --git a/native_client/boost_locale/boost/config/detail/select_platform_config.hpp b/native_client/boost_locale/boost/config/detail/select_platform_config.hpp deleted file mode 100644 index b36eca57a2..0000000000 --- a/native_client/boost_locale/boost/config/detail/select_platform_config.hpp +++ /dev/null @@ -1,142 +0,0 @@ -// Boost compiler configuration selection header file - -// (C) Copyright John Maddock 2001 - 2002. -// (C) Copyright Jens Maurer 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed. -// Note that we define the headers to include using "header_name" not -// in order to prevent macro expansion within the header -// name (for example "linux" is a macro on linux systems). - -#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC) -// linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though? -# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp" - -#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) -// BSD: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp" - -#elif defined(sun) || defined(__sun) -// solaris: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp" - -#elif defined(__sgi) -// SGI Irix: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp" - -#elif defined(__hpux) -// hp unix: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp" - -#elif defined(__CYGWIN__) -// cygwin is not win32: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp" - -#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) -// win32: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" - -#elif defined(__HAIKU__) -// Haiku -# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp" - -#elif defined(__BEOS__) -// BeOS -# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" - -#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) -// MacOS -# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp" - -#elif defined(__TOS_MVS__) -// IBM z/OS -# define BOOST_PLATFORM_CONFIG "boost/config/platform/zos.hpp" - -#elif defined(__IBMCPP__) || defined(_AIX) -// IBM AIX -# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp" - -#elif defined(__amigaos__) -// AmigaOS -# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp" - -#elif defined(__QNXNTO__) -// QNX: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp" - -#elif defined(__VXWORKS__) -// vxWorks: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp" - -#elif defined(__SYMBIAN32__) -// Symbian: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" - -#elif defined(_CRAYC) -// Cray: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp" - -#elif defined(__VMS) -// VMS: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" - -#elif defined(__CloudABI__) -// Nuxi CloudABI: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp" -#else - -# if defined(unix) \ - || defined(__unix) \ - || defined(_XOPEN_SOURCE) \ - || defined(_POSIX_SOURCE) - - // generic unix platform: - -# ifndef BOOST_HAS_UNISTD_H -# define BOOST_HAS_UNISTD_H -# endif - -# include - -# endif - -# if defined (BOOST_ASSERT_CONFIG) - // this must come last - generate an error if we don't - // recognise the platform: -# error "Unknown platform - please configure and report the results to boost.org" -# endif - -#endif - -#if 0 -// -// This section allows dependency scanners to find all the files we *might* include: -// -# include "boost/config/platform/linux.hpp" -# include "boost/config/platform/bsd.hpp" -# include "boost/config/platform/solaris.hpp" -# include "boost/config/platform/irix.hpp" -# include "boost/config/platform/hpux.hpp" -# include "boost/config/platform/cygwin.hpp" -# include "boost/config/platform/win32.hpp" -# include "boost/config/platform/beos.hpp" -# include "boost/config/platform/macos.hpp" -# include "boost/config/platform/zos.hpp" -# include "boost/config/platform/aix.hpp" -# include "boost/config/platform/amigaos.hpp" -# include "boost/config/platform/qnxnto.hpp" -# include "boost/config/platform/vxworks.hpp" -# include "boost/config/platform/symbian.hpp" -# include "boost/config/platform/cray.hpp" -# include "boost/config/platform/vms.hpp" -# include - - - -#endif - diff --git a/native_client/boost_locale/boost/config/detail/select_stdlib_config.hpp b/native_client/boost_locale/boost/config/detail/select_stdlib_config.hpp deleted file mode 100644 index 8db778c86b..0000000000 --- a/native_client/boost_locale/boost/config/detail/select_stdlib_config.hpp +++ /dev/null @@ -1,110 +0,0 @@ -// Boost compiler configuration selection header file - -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001 - 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - -// See http://www.boost.org for most recent version. - -// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed: - -// First include to determine if some version of STLport is in use as the std lib -// (do not rely on this header being included since users can short-circuit this header -// if they know whose std lib they are using.) -#ifdef __cplusplus -# include -#else -# include -#endif - -#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) -// STLPort library; this _must_ come first, otherwise since -// STLport typically sits on top of some other library, we -// can end up detecting that first rather than STLport: -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp" - -#else - -// If our std lib was not some version of STLport, and has not otherwise -// been detected, then include as it is about -// the smallest of the std lib headers that includes real C++ stuff. -// Some std libs do not include their C++-related macros in -// so this additional include makes sure we get those definitions. -// Note: do not rely on this header being included since users can short-circuit this -// #include if they know whose std lib they are using. -#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\ - && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\ - && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\ - && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER) -#include -#endif - -#if defined(__LIBCOMO__) -// Comeau STL: -#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp" - -#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) -// Rogue Wave library: -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp" - -#elif defined(_LIBCPP_VERSION) -// libc++ -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp" - -#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) -// GNU libstdc++ 3 -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp" - -#elif defined(__STL_CONFIG_H) -// generic SGI STL -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp" - -#elif defined(__MSL_CPP__) -// MSL standard lib: -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp" - -#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__) -// IBM z/OS XL C/C++ -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/xlcpp_zos.hpp" - -#elif defined(__IBMCPP__) -// take the default VACPP std lib -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp" - -#elif defined(MSIPL_COMPILE_H) -// Modena C++ standard library -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp" - -#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) -// Dinkumware Library (this has to appear after any possible replacement libraries): -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp" - -#elif defined (BOOST_ASSERT_CONFIG) -// this must come last - generate an error if we don't -// recognise the library: -# error "Unknown standard library - please configure and report the results to boost.org" - -#endif - -#endif - -#if 0 -// -// This section allows dependency scanners to find all the files we *might* include: -// -# include "boost/config/stdlib/stlport.hpp" -# include "boost/config/stdlib/libcomo.hpp" -# include "boost/config/stdlib/roguewave.hpp" -# include "boost/config/stdlib/libcpp.hpp" -# include "boost/config/stdlib/libstdcpp3.hpp" -# include "boost/config/stdlib/sgi.hpp" -# include "boost/config/stdlib/msl.hpp" -# include "boost/config/stdlib/xlcpp_zos.hpp" -# include "boost/config/stdlib/vacpp.hpp" -# include "boost/config/stdlib/modena.hpp" -# include "boost/config/stdlib/dinkumware.hpp" -#endif - diff --git a/native_client/boost_locale/boost/config/detail/suffix.hpp b/native_client/boost_locale/boost/config/detail/suffix.hpp deleted file mode 100644 index 6abec22f58..0000000000 --- a/native_client/boost_locale/boost/config/detail/suffix.hpp +++ /dev/null @@ -1,1038 +0,0 @@ -// Boost config.hpp configuration header file ------------------------------// -// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file - -// Copyright (c) 2001-2003 John Maddock -// Copyright (c) 2001 Darin Adler -// Copyright (c) 2001 Peter Dimov -// Copyright (c) 2002 Bill Kempf -// Copyright (c) 2002 Jens Maurer -// Copyright (c) 2002-2003 David Abrahams -// Copyright (c) 2003 Gennaro Prota -// Copyright (c) 2003 Eric Friedman -// Copyright (c) 2010 Eric Jourdanneau, Joel Falcou -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for most recent version. - -// Boost config.hpp policy and rationale documentation has been moved to -// http://www.boost.org/libs/config/ -// -// This file is intended to be stable, and relatively unchanging. -// It should contain boilerplate code only - no compiler specific -// code unless it is unavoidable - no changes unless unavoidable. - -#ifndef BOOST_CONFIG_SUFFIX_HPP -#define BOOST_CONFIG_SUFFIX_HPP - -#if defined(__GNUC__) && (__GNUC__ >= 4) -// -// Some GCC-4.x versions issue warnings even when __extension__ is used, -// so use this as a workaround: -// -#pragma GCC system_header -#endif - -// -// ensure that visibility macros are always defined, thus symplifying use -// -#ifndef BOOST_SYMBOL_EXPORT -# define BOOST_SYMBOL_EXPORT -#endif -#ifndef BOOST_SYMBOL_IMPORT -# define BOOST_SYMBOL_IMPORT -#endif -#ifndef BOOST_SYMBOL_VISIBLE -# define BOOST_SYMBOL_VISIBLE -#endif - -// -// look for long long by looking for the appropriate macros in . -// Note that we use limits.h rather than climits for maximal portability, -// remember that since these just declare a bunch of macros, there should be -// no namespace issues from this. -// -#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ - && !defined(BOOST_MSVC) && !defined(__BORLANDC__) -# include -# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) -# define BOOST_HAS_LONG_LONG -# else -# define BOOST_NO_LONG_LONG -# endif -#endif - -// GCC 3.x will clean up all of those nasty macro definitions that -// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine -// it under GCC 3.x. -#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS) -# undef BOOST_NO_CTYPE_FUNCTIONS -#endif - -// -// Assume any extensions are in namespace std:: unless stated otherwise: -// -# ifndef BOOST_STD_EXTENSION_NAMESPACE -# define BOOST_STD_EXTENSION_NAMESPACE std -# endif - -// -// If cv-qualified specializations are not allowed, then neither are cv-void ones: -// -# if defined(BOOST_NO_CV_SPECIALIZATIONS) \ - && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) -# define BOOST_NO_CV_VOID_SPECIALIZATIONS -# endif - -// -// If there is no numeric_limits template, then it can't have any compile time -// constants either! -// -# if defined(BOOST_NO_LIMITS) \ - && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS -# endif - -// -// if there is no long long then there is no specialisation -// for numeric_limits either: -// -#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS) -# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS -#endif - -// -// if there is no __int64 then there is no specialisation -// for numeric_limits<__int64> either: -// -#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS) -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -#endif - -// -// if member templates are supported then so is the -// VC6 subset of member templates: -// -# if !defined(BOOST_NO_MEMBER_TEMPLATES) \ - && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) -# define BOOST_MSVC6_MEMBER_TEMPLATES -# endif - -// -// Without partial specialization, can't test for partial specialisation bugs: -// -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) -# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG -# endif - -// -// Without partial specialization, we can't have array-type partial specialisations: -// -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) -# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS -# endif - -// -// Without partial specialization, std::iterator_traits can't work: -// -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_NO_STD_ITERATOR_TRAITS) -# define BOOST_NO_STD_ITERATOR_TRAITS -# endif - -// -// Without partial specialization, partial -// specialization with default args won't work either: -// -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) -# define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS -# endif - -// -// Without member template support, we can't have template constructors -// in the standard library either: -// -# if defined(BOOST_NO_MEMBER_TEMPLATES) \ - && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ - && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) -# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS -# endif - -// -// Without member template support, we can't have a conforming -// std::allocator template either: -// -# if defined(BOOST_NO_MEMBER_TEMPLATES) \ - && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ - && !defined(BOOST_NO_STD_ALLOCATOR) -# define BOOST_NO_STD_ALLOCATOR -# endif - -// -// without ADL support then using declarations will break ADL as well: -// -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#endif - -// -// Without typeid support we have no dynamic RTTI either: -// -#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI) -# define BOOST_NO_RTTI -#endif - -// -// If we have a standard allocator, then we have a partial one as well: -// -#if !defined(BOOST_NO_STD_ALLOCATOR) -# define BOOST_HAS_PARTIAL_STD_ALLOCATOR -#endif - -// -// We can't have a working std::use_facet if there is no std::locale: -// -# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET) -# define BOOST_NO_STD_USE_FACET -# endif - -// -// We can't have a std::messages facet if there is no std::locale: -// -# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES) -# define BOOST_NO_STD_MESSAGES -# endif - -// -// We can't have a working std::wstreambuf if there is no std::locale: -// -# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF) -# define BOOST_NO_STD_WSTREAMBUF -# endif - -// -// We can't have a if there is no : -// -# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE) -# define BOOST_NO_CWCTYPE -# endif - -// -// We can't have a swprintf if there is no : -// -# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF) -# define BOOST_NO_SWPRINTF -# endif - -// -// If Win32 support is turned off, then we must turn off -// threading support also, unless there is some other -// thread API enabled: -// -#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \ - && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS) -# define BOOST_DISABLE_THREADS -#endif - -// -// Turn on threading support if the compiler thinks that it's in -// multithreaded mode. We put this here because there are only a -// limited number of macros that identify this (if there's any missing -// from here then add to the appropriate compiler section): -// -#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ - || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \ - && !defined(BOOST_HAS_THREADS) -# define BOOST_HAS_THREADS -#endif - -// -// Turn threading support off if BOOST_DISABLE_THREADS is defined: -// -#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS) -# undef BOOST_HAS_THREADS -#endif - -// -// Turn threading support off if we don't recognise the threading API: -// -#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\ - && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\ - && !defined(BOOST_HAS_MPTASKS) -# undef BOOST_HAS_THREADS -#endif - -// -// Turn threading detail macros off if we don't (want to) use threading -// -#ifndef BOOST_HAS_THREADS -# undef BOOST_HAS_PTHREADS -# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# undef BOOST_HAS_PTHREAD_YIELD -# undef BOOST_HAS_PTHREAD_DELAY_NP -# undef BOOST_HAS_WINTHREADS -# undef BOOST_HAS_BETHREADS -# undef BOOST_HAS_MPTASKS -#endif - -// -// If the compiler claims to be C99 conformant, then it had better -// have a : -// -# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) -# define BOOST_HAS_STDINT_H -# ifndef BOOST_HAS_LOG1P -# define BOOST_HAS_LOG1P -# endif -# ifndef BOOST_HAS_EXPM1 -# define BOOST_HAS_EXPM1 -# endif -# endif - -// -// Define BOOST_NO_SLIST and BOOST_NO_HASH if required. -// Note that this is for backwards compatibility only. -// -# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST) -# define BOOST_NO_SLIST -# endif - -# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH) -# define BOOST_NO_HASH -# endif - -// -// Set BOOST_SLIST_HEADER if not set already: -// -#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER) -# define BOOST_SLIST_HEADER -#endif - -// -// Set BOOST_HASH_SET_HEADER if not set already: -// -#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER) -# define BOOST_HASH_SET_HEADER -#endif - -// -// Set BOOST_HASH_MAP_HEADER if not set already: -// -#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER) -# define BOOST_HASH_MAP_HEADER -#endif - -// BOOST_HAS_ABI_HEADERS -// This macro gets set if we have headers that fix the ABI, -// and prevent ODR violations when linking to external libraries: -#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS) -# define BOOST_HAS_ABI_HEADERS -#endif - -#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS) -# undef BOOST_HAS_ABI_HEADERS -#endif - -// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------// -// Because std::size_t usage is so common, even in boost headers which do not -// otherwise use the C library, the workaround is included here so -// that ugly workaround code need not appear in many other boost headers. -// NOTE WELL: This is a workaround for non-conforming compilers; -// must still be #included in the usual places so that inclusion -// works as expected with standard conforming compilers. The resulting -// double inclusion of is harmless. - -# if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus) -# include - namespace std { using ::ptrdiff_t; using ::size_t; } -# endif - -// Workaround for the unfortunate min/max macros defined by some platform headers - -#define BOOST_PREVENT_MACRO_SUBSTITUTION - -#ifndef BOOST_USING_STD_MIN -# define BOOST_USING_STD_MIN() using std::min -#endif - -#ifndef BOOST_USING_STD_MAX -# define BOOST_USING_STD_MAX() using std::max -#endif - -// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------// - -# if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus) - -namespace std { - template - inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { - return __b < __a ? __b : __a; - } - template - inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { - return __a < __b ? __b : __a; - } -} - -# endif - -// BOOST_STATIC_CONSTANT workaround --------------------------------------- // -// On compilers which don't allow in-class initialization of static integral -// constant members, we must use enums as a workaround if we want the constants -// to be available at compile-time. This macro gives us a convenient way to -// declare such constants. - -# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION -# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment } -# else -# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment -# endif - -// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------// -// When the standard library does not have a conforming std::use_facet there -// are various workarounds available, but they differ from library to library. -// The same problem occurs with has_facet. -// These macros provide a consistent way to access a locale's facets. -// Usage: -// replace -// std::use_facet(loc); -// with -// BOOST_USE_FACET(Type, loc); -// Note do not add a std:: prefix to the front of BOOST_USE_FACET! -// Use for BOOST_HAS_FACET is analogous. - -#if defined(BOOST_NO_STD_USE_FACET) -# ifdef BOOST_HAS_TWO_ARG_USE_FACET -# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast(0)) -# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast(0)) -# elif defined(BOOST_HAS_MACRO_USE_FACET) -# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type) -# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type) -# elif defined(BOOST_HAS_STLP_USE_FACET) -# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet(loc)) -# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) -# endif -#else -# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc) -# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) -#endif - -// BOOST_NESTED_TEMPLATE workaround ------------------------------------------// -// Member templates are supported by some compilers even though they can't use -// the A::template member syntax, as a workaround replace: -// -// typedef typename A::template rebind binder; -// -// with: -// -// typedef typename A::BOOST_NESTED_TEMPLATE rebind binder; - -#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD -# define BOOST_NESTED_TEMPLATE template -#else -# define BOOST_NESTED_TEMPLATE -#endif - -// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------// -// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION -// is defined, in which case it evaluates to return x; Use when you have a return -// statement that can never be reached. - -#ifndef BOOST_UNREACHABLE_RETURN -# ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION -# define BOOST_UNREACHABLE_RETURN(x) return x; -# else -# define BOOST_UNREACHABLE_RETURN(x) -# endif -#endif - -// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// -// -// Some compilers don't support the use of `typename' for dependent -// types in deduced contexts, e.g. -// -// template void f(T, typename T::type); -// ^^^^^^^^ -// Replace these declarations with: -// -// template void f(T, BOOST_DEDUCED_TYPENAME T::type); - -#ifndef BOOST_NO_DEDUCED_TYPENAME -# define BOOST_DEDUCED_TYPENAME typename -#else -# define BOOST_DEDUCED_TYPENAME -#endif - -#ifndef BOOST_NO_TYPENAME_WITH_CTOR -# define BOOST_CTOR_TYPENAME typename -#else -# define BOOST_CTOR_TYPENAME -#endif - -// long long workaround ------------------------------------------// -// On gcc (and maybe other compilers?) long long is alway supported -// but it's use may generate either warnings (with -ansi), or errors -// (with -pedantic -ansi) unless it's use is prefixed by __extension__ -// -#if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus) -namespace boost{ -# ifdef __GNUC__ - __extension__ typedef long long long_long_type; - __extension__ typedef unsigned long long ulong_long_type; -# else - typedef long long long_long_type; - typedef unsigned long long ulong_long_type; -# endif -} -#endif -// same again for __int128: -#if defined(BOOST_HAS_INT128) && defined(__cplusplus) -namespace boost{ -# ifdef __GNUC__ - __extension__ typedef __int128 int128_type; - __extension__ typedef unsigned __int128 uint128_type; -# else - typedef __int128 int128_type; - typedef unsigned __int128 uint128_type; -# endif -} -#endif -// same again for __float128: -#if defined(BOOST_HAS_FLOAT128) && defined(__cplusplus) -namespace boost { -# ifdef __GNUC__ - __extension__ typedef __float128 float128_type; -# else - typedef __float128 float128_type; -# endif -} -#endif - -// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// - -// These macros are obsolete. Port away and remove. - -# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) -# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) -# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) -# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) - -# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) - -// When BOOST_NO_STD_TYPEINFO is defined, we can just import -// the global definition into std namespace: -#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus) -#include -namespace std{ using ::type_info; } -#endif - -// ---------------------------------------------------------------------------// - -// -// Helper macro BOOST_STRINGIZE: -// Converts the parameter X to a string after macro replacement -// on X has been performed. -// -#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) -#define BOOST_DO_STRINGIZE(X) #X - -// -// Helper macro BOOST_JOIN: -// The following piece of macro magic joins the two -// arguments together, even when one of the arguments is -// itself a macro (see 16.3.1 in C++ standard). The key -// is that macro expansion of macro arguments does not -// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. -// -#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y ) -#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y) -#define BOOST_DO_JOIN2( X, Y ) X##Y - -// -// Set some default values for compiler/library/platform names. -// These are for debugging config setup only: -// -# ifndef BOOST_COMPILER -# define BOOST_COMPILER "Unknown ISO C++ Compiler" -# endif -# ifndef BOOST_STDLIB -# define BOOST_STDLIB "Unknown ISO standard library" -# endif -# ifndef BOOST_PLATFORM -# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \ - || defined(_POSIX_SOURCE) -# define BOOST_PLATFORM "Generic Unix" -# else -# define BOOST_PLATFORM "Unknown" -# endif -# endif - -// -// Set some default values GPU support -// -# ifndef BOOST_GPU_ENABLED -# define BOOST_GPU_ENABLED -# endif - -// BOOST_RESTRICT ---------------------------------------------// -// Macro to use in place of 'restrict' keyword variants -#if !defined(BOOST_RESTRICT) -# if defined(_MSC_VER) -# define BOOST_RESTRICT __restrict -# if !defined(BOOST_NO_RESTRICT_REFERENCES) && (_MSC_FULL_VER < 190023026) -# define BOOST_NO_RESTRICT_REFERENCES -# endif -# elif defined(__GNUC__) && __GNUC__ > 3 - // Clang also defines __GNUC__ (as 4) -# define BOOST_RESTRICT __restrict__ -# else -# define BOOST_RESTRICT -# if !defined(BOOST_NO_RESTRICT_REFERENCES) -# define BOOST_NO_RESTRICT_REFERENCES -# endif -# endif -#endif - -// BOOST_FORCEINLINE ---------------------------------------------// -// Macro to use in place of 'inline' to force a function to be inline -#if !defined(BOOST_FORCEINLINE) -# if defined(_MSC_VER) -# define BOOST_FORCEINLINE __forceinline -# elif defined(__GNUC__) && __GNUC__ > 3 - // Clang also defines __GNUC__ (as 4) -# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__)) -# else -# define BOOST_FORCEINLINE inline -# endif -#endif - -// BOOST_NOINLINE ---------------------------------------------// -// Macro to use in place of 'inline' to prevent a function to be inlined -#if !defined(BOOST_NOINLINE) -# if defined(_MSC_VER) -# define BOOST_NOINLINE __declspec(noinline) -# elif defined(__GNUC__) && __GNUC__ > 3 - // Clang also defines __GNUC__ (as 4) -# if defined(__CUDACC__) - // nvcc doesn't always parse __noinline__, - // see: https://svn.boost.org/trac/boost/ticket/9392 -# define BOOST_NOINLINE __attribute__ ((noinline)) -# else -# define BOOST_NOINLINE __attribute__ ((__noinline__)) -# endif -# else -# define BOOST_NOINLINE -# endif -#endif - -// BOOST_NORETURN ---------------------------------------------// -// Macro to use before a function declaration/definition to designate -// the function as not returning normally (i.e. with a return statement -// or by leaving the function scope, if the function return type is void). -#if !defined(BOOST_NORETURN) -# if defined(_MSC_VER) -# define BOOST_NORETURN __declspec(noreturn) -# elif defined(__GNUC__) -# define BOOST_NORETURN __attribute__ ((__noreturn__)) -# elif defined(__has_attribute) && defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x5130) -# if __has_attribute(noreturn) -# define BOOST_NORETURN [[noreturn]] -# endif -# elif defined(__has_cpp_attribute) -# if __has_cpp_attribute(noreturn) -# define BOOST_NORETURN [[noreturn]] -# endif -# endif -#endif - -#if !defined(BOOST_NORETURN) -# define BOOST_NO_NORETURN -# define BOOST_NORETURN -#endif - -// Branch prediction hints -// These macros are intended to wrap conditional expressions that yield true or false -// -// if (BOOST_LIKELY(var == 10)) -// { -// // the most probable code here -// } -// -#if !defined(BOOST_LIKELY) -# define BOOST_LIKELY(x) x -#endif -#if !defined(BOOST_UNLIKELY) -# define BOOST_UNLIKELY(x) x -#endif - -// Type and data alignment specification -// -#if !defined(BOOST_ALIGNMENT) -# if !defined(BOOST_NO_CXX11_ALIGNAS) -# define BOOST_ALIGNMENT(x) alignas(x) -# elif defined(_MSC_VER) -# define BOOST_ALIGNMENT(x) __declspec(align(x)) -# elif defined(__GNUC__) -# define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x))) -# else -# define BOOST_NO_ALIGNMENT -# define BOOST_ALIGNMENT(x) -# endif -#endif - -// Lack of non-public defaulted functions is implied by the lack of any defaulted functions -#if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) -# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS -#endif - -// Defaulted and deleted function declaration helpers -// These macros are intended to be inside a class definition. -// BOOST_DEFAULTED_FUNCTION accepts the function declaration and its -// body, which will be used if the compiler doesn't support defaulted functions. -// BOOST_DELETED_FUNCTION only accepts the function declaration. It -// will expand to a private function declaration, if the compiler doesn't support -// deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION -// in the end of the class definition. -// -// class my_class -// { -// public: -// // Default-constructible -// BOOST_DEFAULTED_FUNCTION(my_class(), {}) -// // Copying prohibited -// BOOST_DELETED_FUNCTION(my_class(my_class const&)) -// BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&)) -// }; -// -#if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)) -# define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default; -#else -# define BOOST_DEFAULTED_FUNCTION(fun, body) fun body -#endif - -#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) -# define BOOST_DELETED_FUNCTION(fun) fun = delete; -#else -# define BOOST_DELETED_FUNCTION(fun) private: fun; -#endif - -// -// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined -// -#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276) -#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE -#endif - -// -------------------- Deprecated macros for 1.50 --------------------------- -// These will go away in a future release - -// Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP -// instead of BOOST_NO_STD_UNORDERED -#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET) -# ifndef BOOST_NO_CXX11_STD_UNORDERED -# define BOOST_NO_CXX11_STD_UNORDERED -# endif -#endif - -// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS -#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS) -# define BOOST_NO_INITIALIZER_LISTS -#endif - -// Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY -#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY) -# define BOOST_NO_0X_HDR_ARRAY -#endif -// Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO -#if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO) -# define BOOST_NO_0X_HDR_CHRONO -#endif -// Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT -#if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT) -# define BOOST_NO_0X_HDR_CODECVT -#endif -// Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE -#if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE) -# define BOOST_NO_0X_HDR_CONDITION_VARIABLE -#endif -// Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST -#if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST) -# define BOOST_NO_0X_HDR_FORWARD_LIST -#endif -// Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE -#if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE) -# define BOOST_NO_0X_HDR_FUTURE -#endif - -// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST -// instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS -#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST -# define BOOST_NO_0X_HDR_INITIALIZER_LIST -# endif -# ifndef BOOST_NO_INITIALIZER_LISTS -# define BOOST_NO_INITIALIZER_LISTS -# endif -#endif - -// Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX -#if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX) -# define BOOST_NO_0X_HDR_MUTEX -#endif -// Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM -#if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM) -# define BOOST_NO_0X_HDR_RANDOM -#endif -// Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO -#if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO) -# define BOOST_NO_0X_HDR_RATIO -#endif -// Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX -#if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX) -# define BOOST_NO_0X_HDR_REGEX -#endif -// Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR -#if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR) -# define BOOST_NO_0X_HDR_SYSTEM_ERROR -#endif -// Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD -#if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD) -# define BOOST_NO_0X_HDR_THREAD -#endif -// Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE -#if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE) -# define BOOST_NO_0X_HDR_TUPLE -#endif -// Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS -#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS) -# define BOOST_NO_0X_HDR_TYPE_TRAITS -#endif -// Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX -#if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX) -# define BOOST_NO_0X_HDR_TYPEINDEX -#endif -// Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP -#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP) -# define BOOST_NO_0X_HDR_UNORDERED_MAP -#endif -// Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET -#if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET) -# define BOOST_NO_0X_HDR_UNORDERED_SET -#endif - -// ------------------ End of deprecated macros for 1.50 --------------------------- - -// -------------------- Deprecated macros for 1.51 --------------------------- -// These will go away in a future release - -// Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS -#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS) -# define BOOST_NO_AUTO_DECLARATIONS -#endif -// Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS -#if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS) -# define BOOST_NO_AUTO_MULTIDECLARATIONS -#endif -// Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T -#if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T) -# define BOOST_NO_CHAR16_T -#endif -// Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T -#if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T) -# define BOOST_NO_CHAR32_T -#endif -// Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES -#if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES) -# define BOOST_NO_TEMPLATE_ALIASES -#endif -// Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR -#if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR) -# define BOOST_NO_CONSTEXPR -#endif -// Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276 -#if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276) -# define BOOST_NO_DECLTYPE_N3276 -#endif -// Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE -#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE) -# define BOOST_NO_DECLTYPE -#endif -// Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS -#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS) -# define BOOST_NO_DEFAULTED_FUNCTIONS -#endif -// Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS -#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS) -# define BOOST_NO_DELETED_FUNCTIONS -#endif -// Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS) -# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#endif -// Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE -#if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE) -# define BOOST_NO_EXTERN_TEMPLATE -#endif -// Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS) -# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#endif -// Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS -#if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS) -# define BOOST_NO_LAMBDAS -#endif -// Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS -#if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS) -# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS -#endif -// Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT -#if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT) -# define BOOST_NO_NOEXCEPT -#endif -// Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR -#if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR) -# define BOOST_NO_NULLPTR -#endif -// Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS -#if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS) -# define BOOST_NO_RAW_LITERALS -#endif -// Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES -#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES) -# define BOOST_NO_RVALUE_REFERENCES -#endif -// Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS -#if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS) -# define BOOST_NO_SCOPED_ENUMS -#endif -// Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT -#if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT) -# define BOOST_NO_STATIC_ASSERT -#endif -// Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED -#if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED) -# define BOOST_NO_STD_UNORDERED -#endif -// Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS -#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS) -# define BOOST_NO_UNICODE_LITERALS -#endif -// Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX -#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX) -# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX -#endif -// Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES) -# define BOOST_NO_VARIADIC_TEMPLATES -#endif -// Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS -#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS) -# define BOOST_NO_VARIADIC_MACROS -#endif -// Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST -#if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST) -# define BOOST_NO_NUMERIC_LIMITS_LOWEST -#endif -// ------------------ End of deprecated macros for 1.51 --------------------------- - - - -// -// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR -// These aid the transition to C++11 while still supporting C++03 compilers -// -#ifdef BOOST_NO_CXX11_NOEXCEPT -# define BOOST_NOEXCEPT -# define BOOST_NOEXCEPT_OR_NOTHROW throw() -# define BOOST_NOEXCEPT_IF(Predicate) -# define BOOST_NOEXCEPT_EXPR(Expression) false -#else -# define BOOST_NOEXCEPT noexcept -# define BOOST_NOEXCEPT_OR_NOTHROW noexcept -# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate)) -# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) -#endif -// -// Helper macro BOOST_FALLTHROUGH -// Fallback definition of BOOST_FALLTHROUGH macro used to mark intended -// fall-through between case labels in a switch statement. We use a definition -// that requires a semicolon after it to avoid at least one type of misuse even -// on unsupported compilers. -// -#ifndef BOOST_FALLTHROUGH -# define BOOST_FALLTHROUGH ((void)0) -#endif - -// -// constexpr workarounds -// -#if defined(BOOST_NO_CXX11_CONSTEXPR) -#define BOOST_CONSTEXPR -#define BOOST_CONSTEXPR_OR_CONST const -#else -#define BOOST_CONSTEXPR constexpr -#define BOOST_CONSTEXPR_OR_CONST constexpr -#endif -#if defined(BOOST_NO_CXX14_CONSTEXPR) -#define BOOST_CXX14_CONSTEXPR -#else -#define BOOST_CXX14_CONSTEXPR constexpr -#endif - -// -// Unused variable/typedef workarounds: -// -#ifndef BOOST_ATTRIBUTE_UNUSED -# define BOOST_ATTRIBUTE_UNUSED -#endif - -#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST - -// -// Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined -// -#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT) -# define BOOST_HAS_STATIC_ASSERT -#endif - -// -// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined -// -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS) -#define BOOST_HAS_RVALUE_REFS -#endif - -// -// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined -// -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL) -#define BOOST_HAS_VARIADIC_TMPL -#endif -// -// Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when -// BOOST_NO_CXX11_VARIADIC_TEMPLATES is set: -// -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS) -# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS -#endif - -// -// Finish off with checks for macros that are depricated / no longer supported, -// if any of these are set then it's very likely that much of Boost will no -// longer work. So stop with a #error for now, but give the user a chance -// to continue at their own risk if they really want to: -// -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED) -# error "You are using a compiler which lacks features which are now a minimum requirement in order to use Boost, define BOOST_CONFIG_ALLOW_DEPRECATED if you want to continue at your own risk!!!" -#endif - -#endif diff --git a/native_client/boost_locale/boost/config/no_tr1/cmath.hpp b/native_client/boost_locale/boost/config/no_tr1/cmath.hpp deleted file mode 100644 index d8268d842a..0000000000 --- a/native_client/boost_locale/boost/config/no_tr1/cmath.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2008. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// The aim of this header is just to include but to do -// so in a way that does not result in recursive inclusion of -// the Boost TR1 components if boost/tr1/tr1/cmath is in the -// include search path. We have to do this to avoid circular -// dependencies: -// - -#ifndef BOOST_CONFIG_CMATH -# define BOOST_CONFIG_CMATH - -# ifndef BOOST_TR1_NO_RECURSION -# define BOOST_TR1_NO_RECURSION -# define BOOST_CONFIG_NO_CMATH_RECURSION -# endif - -# include - -# ifdef BOOST_CONFIG_NO_CMATH_RECURSION -# undef BOOST_TR1_NO_RECURSION -# undef BOOST_CONFIG_NO_CMATH_RECURSION -# endif - -#endif diff --git a/native_client/boost_locale/boost/config/no_tr1/complex.hpp b/native_client/boost_locale/boost/config/no_tr1/complex.hpp deleted file mode 100644 index ca200922b3..0000000000 --- a/native_client/boost_locale/boost/config/no_tr1/complex.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2005. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// The aim of this header is just to include but to do -// so in a way that does not result in recursive inclusion of -// the Boost TR1 components if boost/tr1/tr1/complex is in the -// include search path. We have to do this to avoid circular -// dependencies: -// - -#ifndef BOOST_CONFIG_COMPLEX -# define BOOST_CONFIG_COMPLEX - -# ifndef BOOST_TR1_NO_RECURSION -# define BOOST_TR1_NO_RECURSION -# define BOOST_CONFIG_NO_COMPLEX_RECURSION -# endif - -# include - -# ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION -# undef BOOST_TR1_NO_RECURSION -# undef BOOST_CONFIG_NO_COMPLEX_RECURSION -# endif - -#endif diff --git a/native_client/boost_locale/boost/config/no_tr1/functional.hpp b/native_client/boost_locale/boost/config/no_tr1/functional.hpp deleted file mode 100644 index e395efc197..0000000000 --- a/native_client/boost_locale/boost/config/no_tr1/functional.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2005. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// The aim of this header is just to include but to do -// so in a way that does not result in recursive inclusion of -// the Boost TR1 components if boost/tr1/tr1/functional is in the -// include search path. We have to do this to avoid circular -// dependencies: -// - -#ifndef BOOST_CONFIG_FUNCTIONAL -# define BOOST_CONFIG_FUNCTIONAL - -# ifndef BOOST_TR1_NO_RECURSION -# define BOOST_TR1_NO_RECURSION -# define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION -# endif - -# include - -# ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION -# undef BOOST_TR1_NO_RECURSION -# undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION -# endif - -#endif diff --git a/native_client/boost_locale/boost/config/no_tr1/memory.hpp b/native_client/boost_locale/boost/config/no_tr1/memory.hpp deleted file mode 100644 index 2b5d208027..0000000000 --- a/native_client/boost_locale/boost/config/no_tr1/memory.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2005. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// The aim of this header is just to include but to do -// so in a way that does not result in recursive inclusion of -// the Boost TR1 components if boost/tr1/tr1/memory is in the -// include search path. We have to do this to avoid circular -// dependencies: -// - -#ifndef BOOST_CONFIG_MEMORY -# define BOOST_CONFIG_MEMORY - -# ifndef BOOST_TR1_NO_RECURSION -# define BOOST_TR1_NO_RECURSION -# define BOOST_CONFIG_NO_MEMORY_RECURSION -# endif - -# include - -# ifdef BOOST_CONFIG_NO_MEMORY_RECURSION -# undef BOOST_TR1_NO_RECURSION -# undef BOOST_CONFIG_NO_MEMORY_RECURSION -# endif - -#endif diff --git a/native_client/boost_locale/boost/config/no_tr1/utility.hpp b/native_client/boost_locale/boost/config/no_tr1/utility.hpp deleted file mode 100644 index dea8f115bc..0000000000 --- a/native_client/boost_locale/boost/config/no_tr1/utility.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2005. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// The aim of this header is just to include but to do -// so in a way that does not result in recursive inclusion of -// the Boost TR1 components if boost/tr1/tr1/utility is in the -// include search path. We have to do this to avoid circular -// dependencies: -// - -#ifndef BOOST_CONFIG_UTILITY -# define BOOST_CONFIG_UTILITY - -# ifndef BOOST_TR1_NO_RECURSION -# define BOOST_TR1_NO_RECURSION -# define BOOST_CONFIG_NO_UTILITY_RECURSION -# endif - -# include - -# ifdef BOOST_CONFIG_NO_UTILITY_RECURSION -# undef BOOST_TR1_NO_RECURSION -# undef BOOST_CONFIG_NO_UTILITY_RECURSION -# endif - -#endif diff --git a/native_client/boost_locale/boost/config/platform/aix.hpp b/native_client/boost_locale/boost/config/platform/aix.hpp deleted file mode 100644 index a48e232061..0000000000 --- a/native_client/boost_locale/boost/config/platform/aix.hpp +++ /dev/null @@ -1,33 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// IBM/Aix specific config options: - -#define BOOST_PLATFORM "IBM Aix" - -#define BOOST_HAS_UNISTD_H -#define BOOST_HAS_NL_TYPES_H -#define BOOST_HAS_NANOSLEEP -#define BOOST_HAS_CLOCK_GETTIME - -// This needs support in "boost/cstdint.hpp" exactly like FreeBSD. -// This platform has header named which includes all -// the things needed. -#define BOOST_HAS_STDINT_H - -// Threading API's: -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_PTHREAD_DELAY_NP -#define BOOST_HAS_SCHED_YIELD -//#define BOOST_HAS_PTHREAD_YIELD - -// boilerplate code: -#include - - - - diff --git a/native_client/boost_locale/boost/config/platform/amigaos.hpp b/native_client/boost_locale/boost/config/platform/amigaos.hpp deleted file mode 100644 index 34bcf4128b..0000000000 --- a/native_client/boost_locale/boost/config/platform/amigaos.hpp +++ /dev/null @@ -1,15 +0,0 @@ -// (C) Copyright John Maddock 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -#define BOOST_PLATFORM "AmigaOS" - -#define BOOST_DISABLE_THREADS -#define BOOST_NO_CWCHAR -#define BOOST_NO_STD_WSTRING -#define BOOST_NO_INTRINSIC_WCHAR_T - - diff --git a/native_client/boost_locale/boost/config/platform/beos.hpp b/native_client/boost_locale/boost/config/platform/beos.hpp deleted file mode 100644 index 6158c1c20b..0000000000 --- a/native_client/boost_locale/boost/config/platform/beos.hpp +++ /dev/null @@ -1,26 +0,0 @@ -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// BeOS specific config options: - -#define BOOST_PLATFORM "BeOS" - -#define BOOST_NO_CWCHAR -#define BOOST_NO_CWCTYPE -#define BOOST_HAS_UNISTD_H - -#define BOOST_HAS_BETHREADS - -#ifndef BOOST_DISABLE_THREADS -# define BOOST_HAS_THREADS -#endif - -// boilerplate code: -#include - - - diff --git a/native_client/boost_locale/boost/config/platform/bsd.hpp b/native_client/boost_locale/boost/config/platform/bsd.hpp deleted file mode 100644 index 79e74a080a..0000000000 --- a/native_client/boost_locale/boost/config/platform/bsd.hpp +++ /dev/null @@ -1,86 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001. -// (C) Copyright Douglas Gregor 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// generic BSD config options: - -#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) -#error "This platform is not BSD" -#endif - -#ifdef __FreeBSD__ -#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) -#elif defined(__NetBSD__) -#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) -#elif defined(__OpenBSD__) -#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) -#elif defined(__DragonFly__) -#define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) -#endif - -// -// is this the correct version check? -// FreeBSD has but does not -// advertise the fact in : -// -#if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__) -# define BOOST_HAS_NL_TYPES_H -#endif - -// -// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in -// and not in -// -#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\ - || defined(__OpenBSD__) || defined(__DragonFly__) -# define BOOST_HAS_PTHREADS -#endif - -// -// No wide character support in the BSD header files: -// -#if defined(__NetBSD__) -#define __NetBSD_GCC__ (__GNUC__ * 1000000 \ - + __GNUC_MINOR__ * 1000 \ - + __GNUC_PATCHLEVEL__) -// XXX - the following is required until c++config.h -// defines _GLIBCXX_HAVE_SWPRINTF and friends -// or the preprocessor conditionals are removed -// from the cwchar header. -#define _GLIBCXX_HAVE_SWPRINTF 1 -#endif - -#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \ - || (defined(__NetBSD_GCC__) && (__NetBSD_GCC__ >= 2095003)) || defined(__DragonFly__)) -# define BOOST_NO_CWCHAR -#endif -// -// The BSD has macros only, no functions: -// -#if !defined(__OpenBSD__) || defined(__DragonFly__) -# define BOOST_NO_CTYPE_FUNCTIONS -#endif - -// -// thread API's not auto detected: -// -#define BOOST_HAS_SCHED_YIELD -#define BOOST_HAS_NANOSLEEP -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -#define BOOST_HAS_SIGACTION - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include - - - - - - diff --git a/native_client/boost_locale/boost/config/platform/cloudabi.hpp b/native_client/boost_locale/boost/config/platform/cloudabi.hpp deleted file mode 100644 index bed7b6318d..0000000000 --- a/native_client/boost_locale/boost/config/platform/cloudabi.hpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Nuxi, https://nuxi.nl/ 2015. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#define BOOST_PLATFORM "CloudABI" - -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_STDINT_H -#define BOOST_HAS_UNISTD_H - -#define BOOST_HAS_CLOCK_GETTIME -#define BOOST_HAS_EXPM1 -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_LOG1P -#define BOOST_HAS_NANOSLEEP -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_SCHED_YIELD diff --git a/native_client/boost_locale/boost/config/platform/cray.hpp b/native_client/boost_locale/boost/config/platform/cray.hpp deleted file mode 100644 index 103e9c0620..0000000000 --- a/native_client/boost_locale/boost/config/platform/cray.hpp +++ /dev/null @@ -1,18 +0,0 @@ -// (C) Copyright John Maddock 2011. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - -// See http://www.boost.org for most recent version. - -// SGI Irix specific config options: - -#define BOOST_PLATFORM "Cray" - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include - - - diff --git a/native_client/boost_locale/boost/config/platform/cygwin.hpp b/native_client/boost_locale/boost/config/platform/cygwin.hpp deleted file mode 100644 index 8ecc4a4af5..0000000000 --- a/native_client/boost_locale/boost/config/platform/cygwin.hpp +++ /dev/null @@ -1,57 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// cygwin specific config options: - -#define BOOST_PLATFORM "Cygwin" -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_LOG1P -#define BOOST_HAS_EXPM1 - -// -// Threading API: -// See if we have POSIX threads, if we do use them, otherwise -// revert to native Win threads. -#define BOOST_HAS_UNISTD_H -#include -#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) -# define BOOST_HAS_PTHREADS -# define BOOST_HAS_SCHED_YIELD -# define BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -//# define BOOST_HAS_SIGACTION -#else -# if !defined(BOOST_HAS_WINTHREADS) -# define BOOST_HAS_WINTHREADS -# endif -# define BOOST_HAS_FTIME -#endif - -// -// find out if we have a stdint.h, there should be a better way to do this: -// -#include -#ifdef _STDINT_H -#define BOOST_HAS_STDINT_H -#endif - -/// Cygwin has no fenv.h -#define BOOST_NO_FENV_H - -// boilerplate code: -#include - -// -// Cygwin lies about XSI conformance, there is no nl_types.h: -// -#ifdef BOOST_HAS_NL_TYPES_H -# undef BOOST_HAS_NL_TYPES_H -#endif - - - - diff --git a/native_client/boost_locale/boost/config/platform/haiku.hpp b/native_client/boost_locale/boost/config/platform/haiku.hpp deleted file mode 100644 index 04244c5677..0000000000 --- a/native_client/boost_locale/boost/config/platform/haiku.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright Jessica Hamilton 2014. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Haiku specific config options: - -#define BOOST_PLATFORM "Haiku" - -#define BOOST_HAS_UNISTD_H -#define BOOST_HAS_STDINT_H - -#ifndef BOOST_DISABLE_THREADS -# define BOOST_HAS_THREADS -#endif - -#define BOOST_NO_CXX11_HDR_TYPE_TRAITS -#define BOOST_NO_CXX11_ATOMIC_SMART_PTR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_VARIADIC_MACROS - -// -// thread API's not auto detected: -// -#define BOOST_HAS_SCHED_YIELD -#define BOOST_HAS_GETTIMEOFDAY - -// boilerplate code: -#include diff --git a/native_client/boost_locale/boost/config/platform/hpux.hpp b/native_client/boost_locale/boost/config/platform/hpux.hpp deleted file mode 100644 index 222622e7ee..0000000000 --- a/native_client/boost_locale/boost/config/platform/hpux.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright David Abrahams 2002. -// (C) Copyright Toon Knapen 2003. -// (C) Copyright Boris Gubenko 2006 - 2007. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// hpux specific config options: - -#define BOOST_PLATFORM "HP-UX" - -// In principle, HP-UX has a nice under the name -// However, it has the following problem: -// Use of UINT32_C(0) results in "0u l" for the preprocessed source -// (verifyable with gcc 2.95.3) -#if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__HP_aCC) -# define BOOST_HAS_STDINT_H -#endif - -#if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE)) -# define BOOST_NO_SWPRINTF -#endif -#if defined(__HP_aCC) && !defined(_INCLUDE__STDC_A1_SOURCE) -# define BOOST_NO_CWCTYPE -#endif - -#if defined(__GNUC__) -# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)) - // GNU C on HP-UX does not support threads (checked up to gcc 3.3) -# define BOOST_DISABLE_THREADS -# elif !defined(BOOST_DISABLE_THREADS) - // threads supported from gcc-3.3 onwards: -# define BOOST_HAS_THREADS -# define BOOST_HAS_PTHREADS -# endif -#elif defined(__HP_aCC) && !defined(BOOST_DISABLE_THREADS) -# define BOOST_HAS_PTHREADS -#endif - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include - -// the following are always available: -#ifndef BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_GETTIMEOFDAY -#endif -#ifndef BOOST_HAS_SCHED_YIELD -# define BOOST_HAS_SCHED_YIELD -#endif -#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -#endif -#ifndef BOOST_HAS_NL_TYPES_H -# define BOOST_HAS_NL_TYPES_H -#endif -#ifndef BOOST_HAS_NANOSLEEP -# define BOOST_HAS_NANOSLEEP -#endif -#ifndef BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_GETTIMEOFDAY -#endif -#ifndef BOOST_HAS_DIRENT_H -# define BOOST_HAS_DIRENT_H -#endif -#ifndef BOOST_HAS_CLOCK_GETTIME -# define BOOST_HAS_CLOCK_GETTIME -#endif -#ifndef BOOST_HAS_SIGACTION -# define BOOST_HAS_SIGACTION -#endif -#ifndef BOOST_HAS_NRVO -# ifndef __parisc -# define BOOST_HAS_NRVO -# endif -#endif -#ifndef BOOST_HAS_LOG1P -# define BOOST_HAS_LOG1P -#endif -#ifndef BOOST_HAS_EXPM1 -# define BOOST_HAS_EXPM1 -#endif - diff --git a/native_client/boost_locale/boost/config/platform/irix.hpp b/native_client/boost_locale/boost/config/platform/irix.hpp deleted file mode 100644 index 0acb651552..0000000000 --- a/native_client/boost_locale/boost/config/platform/irix.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - -// See http://www.boost.org for most recent version. - -// SGI Irix specific config options: - -#define BOOST_PLATFORM "SGI Irix" - -#define BOOST_NO_SWPRINTF -// -// these are not auto detected by POSIX feature tests: -// -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE - -#ifdef __GNUC__ - // GNU C on IRIX does not support threads (checked up to gcc 3.3) -# define BOOST_DISABLE_THREADS -#endif - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include - - - diff --git a/native_client/boost_locale/boost/config/platform/linux.hpp b/native_client/boost_locale/boost/config/platform/linux.hpp deleted file mode 100644 index c4eef8f80c..0000000000 --- a/native_client/boost_locale/boost/config/platform/linux.hpp +++ /dev/null @@ -1,106 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// linux specific config options: - -#define BOOST_PLATFORM "linux" - -// make sure we have __GLIBC_PREREQ if available at all -#ifdef __cplusplus -#include -#else -#include -#endif - -// -// added to glibc 2.1.1 -// We can only test for 2.1 though: -// -#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))) - // defines int64_t unconditionally, but defines - // int64_t only if __GNUC__. Thus, assume a fully usable - // only when using GCC. Update 2017: this appears not to be the case for - // recent glibc releases, see bug report: https://svn.boost.org/trac/boost/ticket/13045 -# if defined(__GNUC__) || ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 5))) -# define BOOST_HAS_STDINT_H -# endif -#endif - -#if defined(__LIBCOMO__) - // - // como on linux doesn't have std:: c functions: - // NOTE: versions of libcomo prior to beta28 have octal version numbering, - // e.g. version 25 is 21 (dec) - // -# if __LIBCOMO_VERSION__ <= 20 -# define BOOST_NO_STDC_NAMESPACE -# endif - -# if __LIBCOMO_VERSION__ <= 21 -# define BOOST_NO_SWPRINTF -# endif - -#endif - -// -// If glibc is past version 2 then we definitely have -// gettimeofday, earlier versions may or may not have it: -// -#if defined(__GLIBC__) && (__GLIBC__ >= 2) -# define BOOST_HAS_GETTIMEOFDAY -#endif - -#ifdef __USE_POSIX199309 -# define BOOST_HAS_NANOSLEEP -#endif - -#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) -// __GLIBC_PREREQ is available since 2.1.2 - - // swprintf is available since glibc 2.2.0 -# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98)) -# define BOOST_NO_SWPRINTF -# endif -#else -# define BOOST_NO_SWPRINTF -#endif - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include -#if defined(__USE_GNU) && !defined(__ANDROID__) && !defined(ANDROID) -#define BOOST_HAS_PTHREAD_YIELD -#endif - -#ifndef __GNUC__ -// -// if the compiler is not gcc we still need to be able to parse -// the GNU system headers, some of which (mainly ) -// use GNU specific extensions: -// -# ifndef __extension__ -# define __extension__ -# endif -# ifndef __const__ -# define __const__ const -# endif -# ifndef __volatile__ -# define __volatile__ volatile -# endif -# ifndef __signed__ -# define __signed__ signed -# endif -# ifndef __typeof__ -# define __typeof__ typeof -# endif -# ifndef __inline__ -# define __inline__ inline -# endif -#endif - - diff --git a/native_client/boost_locale/boost/config/platform/macos.hpp b/native_client/boost_locale/boost/config/platform/macos.hpp deleted file mode 100644 index ed7dc15f28..0000000000 --- a/native_client/boost_locale/boost/config/platform/macos.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001 - 2002. -// (C) Copyright Bill Kempf 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Mac OS specific config options: - -#define BOOST_PLATFORM "Mac OS" - -#if __MACH__ && !defined(_MSL_USING_MSL_C) - -// Using the Mac OS X system BSD-style C library. - -# ifndef BOOST_HAS_UNISTD_H -# define BOOST_HAS_UNISTD_H -# endif -// -// Begin by including our boilerplate code for POSIX -// feature detection, this is safe even when using -// the MSL as Metrowerks supply their own -// to replace the platform-native BSD one. G++ users -// should also always be able to do this on MaxOS X. -// -# include -# ifndef BOOST_HAS_STDINT_H -# define BOOST_HAS_STDINT_H -# endif - -// -// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday, -// of these only pthreads are advertised in , so set the -// other options explicitly: -// -# define BOOST_HAS_SCHED_YIELD -# define BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_SIGACTION - -# if (__GNUC__ < 3) && !defined( __APPLE_CC__) - -// GCC strange "ignore std" mode works better if you pretend everything -// is in the std namespace, for the most part. - -# define BOOST_NO_STDC_NAMESPACE -# endif - -# if (__GNUC__ >= 4) - -// Both gcc and intel require these. -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_NANOSLEEP - -# endif - -#else - -// Using the MSL C library. - -// We will eventually support threads in non-Carbon builds, but we do -// not support this yet. -# if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON ) - -# if !defined(BOOST_HAS_PTHREADS) -// MPTasks support is deprecated/removed from Boost: -//# define BOOST_HAS_MPTASKS -# elif ( __dest_os == __mac_os_x ) -// We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the -// gettimeofday and no posix. -# define BOOST_HAS_GETTIMEOFDAY -# endif - -#ifdef BOOST_HAS_PTHREADS -# define BOOST_HAS_THREADS -#endif - -// The remote call manager depends on this. -# define BOOST_BIND_ENABLE_PASCAL - -# endif - -#endif - - - diff --git a/native_client/boost_locale/boost/config/platform/qnxnto.hpp b/native_client/boost_locale/boost/config/platform/qnxnto.hpp deleted file mode 100644 index d0298cb4ec..0000000000 --- a/native_client/boost_locale/boost/config/platform/qnxnto.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright Jim Douglas 2005. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// QNX specific config options: - -#define BOOST_PLATFORM "QNX" - -#define BOOST_HAS_UNISTD_H -#include - -// QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h -// or log1p and expm1: -#undef BOOST_HAS_NL_TYPES_H -#undef BOOST_HAS_LOG1P -#undef BOOST_HAS_EXPM1 - -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE - -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_CLOCK_GETTIME -#define BOOST_HAS_NANOSLEEP - - - - - diff --git a/native_client/boost_locale/boost/config/platform/solaris.hpp b/native_client/boost_locale/boost/config/platform/solaris.hpp deleted file mode 100644 index 51ffe67f33..0000000000 --- a/native_client/boost_locale/boost/config/platform/solaris.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// sun specific config options: - -#define BOOST_PLATFORM "Sun Solaris" - -#define BOOST_HAS_GETTIMEOFDAY - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include - -// -// pthreads don't actually work with gcc unless _PTHREADS is defined: -// -#if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS) -# undef BOOST_HAS_PTHREADS -#endif - -#define BOOST_HAS_STDINT_H -#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -#define BOOST_HAS_LOG1P -#define BOOST_HAS_EXPM1 - - diff --git a/native_client/boost_locale/boost/config/platform/symbian.hpp b/native_client/boost_locale/boost/config/platform/symbian.hpp deleted file mode 100644 index f814d00b5b..0000000000 --- a/native_client/boost_locale/boost/config/platform/symbian.hpp +++ /dev/null @@ -1,97 +0,0 @@ -// (C) Copyright Yuriy Krasnoschek 2009. -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// symbian specific config options: - - -#define BOOST_PLATFORM "Symbian" -#define BOOST_SYMBIAN 1 - - -#if defined(__S60_3X__) -// Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL -# define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK -// make sure we have __GLIBC_PREREQ if available at all -#ifdef __cplusplus -#include -#else -#include -#endif// boilerplate code: -# define BOOST_HAS_UNISTD_H -# include -// S60 SDK defines _POSIX_VERSION as POSIX.1 -# ifndef BOOST_HAS_STDINT_H -# define BOOST_HAS_STDINT_H -# endif -# ifndef BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_GETTIMEOFDAY -# endif -# ifndef BOOST_HAS_DIRENT_H -# define BOOST_HAS_DIRENT_H -# endif -# ifndef BOOST_HAS_SIGACTION -# define BOOST_HAS_SIGACTION -# endif -# ifndef BOOST_HAS_PTHREADS -# define BOOST_HAS_PTHREADS -# endif -# ifndef BOOST_HAS_NANOSLEEP -# define BOOST_HAS_NANOSLEEP -# endif -# ifndef BOOST_HAS_SCHED_YIELD -# define BOOST_HAS_SCHED_YIELD -# endif -# ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# endif -# ifndef BOOST_HAS_LOG1P -# define BOOST_HAS_LOG1P -# endif -# ifndef BOOST_HAS_EXPM1 -# define BOOST_HAS_EXPM1 -# endif -# ifndef BOOST_POSIX_API -# define BOOST_POSIX_API -# endif -// endianess support -# include -// Symbian SDK provides _BYTE_ORDER instead of __BYTE_ORDER -# ifndef __LITTLE_ENDIAN -# ifdef _LITTLE_ENDIAN -# define __LITTLE_ENDIAN _LITTLE_ENDIAN -# else -# define __LITTLE_ENDIAN 1234 -# endif -# endif -# ifndef __BIG_ENDIAN -# ifdef _BIG_ENDIAN -# define __BIG_ENDIAN _BIG_ENDIAN -# else -# define __BIG_ENDIAN 4321 -# endif -# endif -# ifndef __BYTE_ORDER -# define __BYTE_ORDER __LITTLE_ENDIAN // Symbian is LE -# endif -// Known limitations -# define BOOST_ASIO_DISABLE_SERIAL_PORT -# define BOOST_DATE_TIME_NO_LOCALE -# define BOOST_NO_STD_WSTRING -# define BOOST_EXCEPTION_DISABLE -# define BOOST_NO_EXCEPTIONS - -#else // TODO: More platform support e.g. UIQ -# error "Unsuppoted Symbian SDK" -#endif - -#if defined(__WINSCW__) && !defined(BOOST_DISABLE_WIN32) -# define BOOST_DISABLE_WIN32 // winscw defines WIN32 macro -#endif - - diff --git a/native_client/boost_locale/boost/config/platform/vms.hpp b/native_client/boost_locale/boost/config/platform/vms.hpp deleted file mode 100644 index f70efcfb8e..0000000000 --- a/native_client/boost_locale/boost/config/platform/vms.hpp +++ /dev/null @@ -1,25 +0,0 @@ -// (C) Copyright Artyom Beilis 2010. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_CONFIG_PLATFORM_VMS_HPP -#define BOOST_CONFIG_PLATFORM_VMS_HPP - -#define BOOST_PLATFORM "OpenVMS" - -#undef BOOST_HAS_STDINT_H -#define BOOST_HAS_UNISTD_H -#define BOOST_HAS_NL_TYPES_H -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_NANOSLEEP -#define BOOST_HAS_CLOCK_GETTIME -#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -#define BOOST_HAS_LOG1P -#define BOOST_HAS_EXPM1 -#define BOOST_HAS_THREADS -#undef BOOST_HAS_SCHED_YIELD - -#endif diff --git a/native_client/boost_locale/boost/config/platform/vxworks.hpp b/native_client/boost_locale/boost/config/platform/vxworks.hpp deleted file mode 100644 index a7f571c499..0000000000 --- a/native_client/boost_locale/boost/config/platform/vxworks.hpp +++ /dev/null @@ -1,392 +0,0 @@ -// (C) Copyright Dustin Spicuzza 2009. -// Adapted to vxWorks 6.9 by Peter Brockamp 2012. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Since WRS does not yet properly support boost under vxWorks -// and this file was badly outdated, but I was keen on using it, -// I patched boost myself to make things work. This has been tested -// and adapted by me for vxWorks 6.9 *only*, as I'm lacking access -// to earlier 6.X versions! The only thing I know for sure is that -// very old versions of vxWorks (namely everything below 6.x) are -// absolutely unable to use boost. This is mainly due to the completely -// outdated libraries and ancient compiler (GCC 2.96 or worse). Do -// not even think of getting this to work, a miserable failure will -// be guaranteed! -// Equally, this file has been tested for RTPs (Real Time Processes) -// only, not for DKMs (Downloadable Kernel Modules). These two types -// of executables differ largely in the available functionality of -// the C-library, STL, and so on. A DKM uses a library similar to those -// of vxWorks 5.X - with all its limitations and incompatibilities -// with respect to ANSI C++ and STL. So probably there might be problems -// with the usage of boost from DKMs. WRS or any voluteers are free to -// prove the opposite! - -// ==================================================================== -// -// Some important information regarding the usage of POSIX semaphores: -// ------------------------------------------------------------------- -// -// VxWorks as a real time operating system handles threads somewhat -// different from what "normal" OSes do, regarding their scheduling! -// This could lead to a scenario called "priority inversion" when using -// semaphores, see http://en.wikipedia.org/wiki/Priority_inversion. -// -// Now, VxWorks POSIX-semaphores for DKM's default to the usage of -// priority inverting semaphores, which is fine. On the other hand, -// for RTP's it defaults to using non priority inverting semaphores, -// which could easily pose a serious problem for a real time process, -// i.e. deadlocks! To overcome this two possibilities do exist: -// -// a) Patch every piece of boost that uses semaphores to instanciate -// the proper type of semaphores. This is non-intrusive with respect -// to the OS and could relatively easy been done by giving all -// semaphores attributes deviating from the default (for in-depth -// information see the POSIX functions pthread_mutexattr_init() -// and pthread_mutexattr_setprotocol()). However this breaks all -// too easily, as with every new version some boost library could -// all in a sudden start using semaphores, resurrecting the very -// same, hard to locate problem over and over again! -// -// b) We could change the default properties for POSIX-semaphores -// that VxWorks uses for RTP's and this is being suggested here, -// as it will more or less seamlessly integrate with boost. I got -// the following information from WRS how to do this, compare -// Wind River TSR# 1209768: -// -// Instructions for changing the default properties of POSIX- -// semaphores for RTP's in VxWorks 6.9: -// - Edit the file /vxworks-6.9/target/usr/src/posix/pthreadLib.c -// in the root of your Workbench-installation. -// - Around line 917 there should be the definition of the default -// mutex attributes: -// -// LOCAL pthread_mutexattr_t defaultMutexAttr = -// { -// PTHREAD_INITIALIZED_OBJ, PTHREAD_PRIO_NONE, 0, -// PTHREAD_MUTEX_DEFAULT -// }; -// -// Here, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. -// - Around line 1236 there should be a definition for the function -// pthread_mutexattr_init(). A couple of lines below you should -// find a block of code like this: -// -// pAttr->mutexAttrStatus = PTHREAD_INITIALIZED_OBJ; -// pAttr->mutexAttrProtocol = PTHREAD_PRIO_NONE; -// pAttr->mutexAttrPrioceiling = 0; -// pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT; -// -// Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. -// - Finally, rebuild your VSB. This will create a new VxWorks kernel -// with the changed properties. That's it! Now, using boost should -// no longer cause any problems with task deadlocks! -// -// And here's another useful piece of information concerning VxWorks' -// POSIX-functionality in general: -// VxWorks is not a genuine POSIX-OS in itself, rather it is using a -// kind of compatibility layer (sort of a wrapper) to emulate the -// POSIX-functionality by using its own resources and functions. -// At the time a task (thread) calls it's first POSIX-function during -// runtime it is being transformed by the OS into a POSIX-thread. -// This transformation does include a call to malloc() to allocate the -// memory required for the housekeeping of POSIX-threads. In a high -// priority RTP this malloc() call may be highly undesirable, as its -// timing is more or less unpredictable (depending on what your actual -// heap looks like). You can circumvent this problem by calling the -// function thread_self() at a well defined point in the code of the -// task, e.g. shortly after the task spawns up. Thereby you are able -// to define the time when the task-transformation will take place and -// you could shift it to an uncritical point where a malloc() call is -// tolerable. So, if this could pose a problem for your code, remember -// to call thread_self() from the affected task at an early stage. -// -// ==================================================================== - -// Block out all versions before vxWorks 6.x, as these don't work: -// Include header with the vxWorks version information and query them -#include -#if !defined(_WRS_VXWORKS_MAJOR) || (_WRS_VXWORKS_MAJOR < 6) -# error "The vxWorks version you're using is so badly outdated,\ - it doesn't work at all with boost, sorry, no chance!" -#endif - -// Handle versions above 5.X but below 6.9 -#if (_WRS_VXWORKS_MAJOR == 6) && (_WRS_VXWORKS_MINOR < 9) -// TODO: Starting from what version does vxWorks work with boost? -// We can't reasonably insert a #warning "" as a user hint here, -// as this will show up with every file including some boost header, -// badly bugging the user... So for the time being we just leave it. -#endif - -// vxWorks specific config options: -// -------------------------------- -#define BOOST_PLATFORM "vxWorks" - -// Special behaviour for DKMs: -#ifdef _WRS_KERNEL - // DKMs do not have the -header, - // but apparently they do have an intrinsic wchar_t meanwhile! -# define BOOST_NO_CWCHAR - - // Lots of wide-functions and -headers are unavailable for DKMs as well: -# define BOOST_NO_CWCTYPE -# define BOOST_NO_SWPRINTF -# define BOOST_NO_STD_WSTRING -# define BOOST_NO_STD_WSTREAMBUF -#endif - -// Generally available headers: -#define BOOST_HAS_UNISTD_H -#define BOOST_HAS_STDINT_H -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_SLIST - -// vxWorks does not have installed an iconv-library by default, -// so unfortunately no Unicode support from scratch is available! -// Thus, instead it is suggested to switch to ICU, as this seems -// to be the most complete and portable option... -#define BOOST_LOCALE_WITH_ICU - -// Generally available functionality: -#define BOOST_HAS_THREADS -#define BOOST_HAS_NANOSLEEP -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_CLOCK_GETTIME -#define BOOST_HAS_MACRO_USE_FACET - -// Generally unavailable functionality, delivered by boost's test function: -//#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result! -#define BOOST_NO_CXX11_EXTERN_TEMPLATE -#define BOOST_NO_CXX11_VARIADIC_MACROS - -// Generally available threading API's: -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_SCHED_YIELD -#define BOOST_HAS_SIGACTION - -// Functionality available for RTPs only: -#ifdef __RTP__ -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_LOG1P -# define BOOST_HAS_EXPM1 -#endif - -// Functionality available for DKMs only: -#ifdef _WRS_KERNEL - // Luckily, at the moment there seems to be none! -#endif - -// These #defines allow detail/posix_features to work, since vxWorks doesn't -// #define them itself for DKMs (for RTPs on the contrary it does): -#ifdef _WRS_KERNEL -# ifndef _POSIX_TIMERS -# define _POSIX_TIMERS 1 -# endif -# ifndef _POSIX_THREADS -# define _POSIX_THREADS 1 -# endif -#endif - -// vxWorks doesn't work with asio serial ports: -#define BOOST_ASIO_DISABLE_SERIAL_PORT -// TODO: The problem here seems to bee that vxWorks uses its own, very specific -// ways to handle serial ports, incompatible with POSIX or anything... -// Maybe a specific implementation would be possible, but until the -// straight need arises... This implementation would presumably consist -// of some vxWorks specific ioctl-calls, etc. Any voluteers? - -// vxWorks-around: #defines CLOCKS_PER_SEC as sysClkRateGet() but -// miserably fails to #include the required to make -// sysClkRateGet() available! So we manually include it here. -#ifdef __RTP__ -# include -# include -#endif - -// vxWorks-around: In the macros INT32_C(), UINT32_C(), INT64_C() and -// UINT64_C() are defined errorneously, yielding not a signed/ -// unsigned long/long long type, but a signed/unsigned int/long -// type. Eventually this leads to compile errors in ratio_fwd.hpp, -// when trying to define several constants which do not fit into a -// long type! We correct them here by redefining. -#include - -// Some macro-magic to do the job -#define VX_JOIN(X, Y) VX_DO_JOIN(X, Y) -#define VX_DO_JOIN(X, Y) VX_DO_JOIN2(X, Y) -#define VX_DO_JOIN2(X, Y) X##Y - -// Correctly setup the macros -#undef INT32_C -#undef UINT32_C -#undef INT64_C -#undef UINT64_C -#define INT32_C(x) VX_JOIN(x, L) -#define UINT32_C(x) VX_JOIN(x, UL) -#define INT64_C(x) VX_JOIN(x, LL) -#define UINT64_C(x) VX_JOIN(x, ULL) - -// #include Libraries required for the following function adaption -#include -#include -#include - -// Use C-linkage for the following helper functions -extern "C" { - -// vxWorks-around: The required functions getrlimit() and getrlimit() are missing. -// But we have the similar functions getprlimit() and setprlimit(), -// which may serve the purpose. -// Problem: The vxWorks-documentation regarding these functions -// doesn't deserve its name! It isn't documented what the first two -// parameters idtype and id mean, so we must fall back to an educated -// guess - null, argh... :-/ - -// TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason. -// Thus for DKMs there would have to be another implementation. -#ifdef __RTP__ - inline int getrlimit(int resource, struct rlimit *rlp){ - return getprlimit(0, 0, resource, rlp); - } - - inline int setrlimit(int resource, const struct rlimit *rlp){ - return setprlimit(0, 0, resource, const_cast(rlp)); - } -#endif - -// vxWorks has ftruncate() only, so we do simulate truncate(): -inline int truncate(const char *p, off_t l){ - int fd = open(p, O_WRONLY); - if (fd == -1){ - errno = EACCES; - return -1; - } - if (ftruncate(fd, l) == -1){ - close(fd); - errno = EACCES; - return -1; - } - return close(fd); -} - -// Fake symlink handling by dummy functions: -inline int symlink(const char*, const char*){ - // vxWorks has no symlinks -> always return an error! - errno = EACCES; - return -1; -} - -inline ssize_t readlink(const char*, char*, size_t){ - // vxWorks has no symlinks -> always return an error! - errno = EACCES; - return -1; -} - -#if (_WRS_VXWORKS_MAJOR < 7) - -inline int gettimeofday(struct timeval *tv, void * /*tzv*/) { - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - tv->tv_sec = ts.tv_sec; - tv->tv_usec = ts.tv_nsec / 1000; - return 0; -} -#endif - - -// vxWorks does provide neither struct tms nor function times()! -// We implement an empty dummy-function, simply setting the user -// and system time to the half of thew actual system ticks-value -// and the child user and system time to 0. -// Rather ugly but at least it suppresses compiler errors... -// Unfortunately, this of course *does* have an severe impact on -// dependant libraries, actually this is chrono only! Here it will -// not be possible to correctly use user and system times! But -// as vxWorks is lacking the ability to calculate user and system -// process times there seems to be no other possible solution. -struct tms{ - clock_t tms_utime; // User CPU time - clock_t tms_stime; // System CPU time - clock_t tms_cutime; // User CPU time of terminated child processes - clock_t tms_cstime; // System CPU time of terminated child processes -}; - -inline clock_t times(struct tms *t){ - struct timespec ts; - clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); - clock_t ticks(static_cast(static_cast(ts.tv_sec) * CLOCKS_PER_SEC + - static_cast(ts.tv_nsec) * CLOCKS_PER_SEC / 1000000.0)); - t->tms_utime = ticks/2U; - t->tms_stime = ticks/2U; - t->tms_cutime = 0; // vxWorks is lacking the concept of a child process! - t->tms_cstime = 0; // -> Set the wait times for childs to 0 - return ticks; -} - -extern void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h -} // extern "C" - -// Put the selfmade functions into the std-namespace, just in case -namespace std { -# ifdef __RTP__ - using ::getrlimit; - using ::setrlimit; -# endif - using ::truncate; - using ::symlink; - using ::readlink; - using ::times; - using ::gettimeofday; -} - -// Some more macro-magic: -// vxWorks-around: Some functions are not present or broken in vxWorks -// but may be patched to life via helper macros... - -// Include signal.h which might contain a typo to be corrected here -#include - -inline int getpagesize() { return sysconf(_SC_PAGESIZE); } // getpagesize is deprecated anyway! -#ifndef S_ISSOCK -# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? -#endif -inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks! -#ifndef FPE_FLTINV -# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy -#endif -#if !defined(BUS_ADRALN) && defined(BUS_ADRALNR) -# define BUS_ADRALN BUS_ADRALNR // Correct a supposed typo in vxWorks' -#endif -typedef int locale_t; // locale_t is a POSIX-extension, currently not present in vxWorks! - -// #include boilerplate code: -#include - -// vxWorks lies about XSI conformance, there is no nl_types.h: -#undef BOOST_HAS_NL_TYPES_H - -// vxWorks 7 adds C++11 support -// however it is optional, and does not match exactly the support determined -// by examining Dinkum STL version and GCC version (or ICC and DCC) - -#ifndef _WRS_CONFIG_LANG_LIB_CPLUS_CPLUS_USER_2011 -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_SMART_PTR -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_HDR_ATOMIC -#else -# define BOOST_NO_CXX11_NULLPTR -#endif - diff --git a/native_client/boost_locale/boost/config/platform/win32.hpp b/native_client/boost_locale/boost/config/platform/win32.hpp deleted file mode 100644 index 450158fbaa..0000000000 --- a/native_client/boost_locale/boost/config/platform/win32.hpp +++ /dev/null @@ -1,90 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Bill Kempf 2001. -// (C) Copyright Aleksey Gurtovoy 2003. -// (C) Copyright Rene Rivera 2005. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Win32 specific config options: - -#define BOOST_PLATFORM "Win32" - -// Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION. -#if defined(__MINGW32__) -# include <_mingw.h> -#endif - -#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF) -# define BOOST_NO_SWPRINTF -#endif - -// Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT -// If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport), -// its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and -// BOOST_SYMBOL_IMPORT -#ifndef BOOST_SYMBOL_EXPORT -# define BOOST_HAS_DECLSPEC -# define BOOST_SYMBOL_EXPORT __declspec(dllexport) -# define BOOST_SYMBOL_IMPORT __declspec(dllimport) -#endif - -#if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0))) -# define BOOST_HAS_STDINT_H -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS -# endif -# define BOOST_HAS_DIRENT_H -# define BOOST_HAS_UNISTD_H -#endif - -#if defined(__MINGW32__) && (__GNUC__ >= 4) -// Mingw has these functions but there are persistent problems -// with calls to these crashing, so disable for now: -//# define BOOST_HAS_EXPM1 -//# define BOOST_HAS_LOG1P -# define BOOST_HAS_GETTIMEOFDAY -#endif -// -// Win32 will normally be using native Win32 threads, -// but there is a pthread library avaliable as an option, -// we used to disable this when BOOST_DISABLE_WIN32 was -// defined but no longer - this should allow some -// files to be compiled in strict mode - while maintaining -// a consistent setting of BOOST_HAS_THREADS across -// all translation units (needed for shared_ptr etc). -// - -#ifndef BOOST_HAS_PTHREADS -# define BOOST_HAS_WINTHREADS -#endif - -// -// WinCE configuration: -// -#if defined(_WIN32_WCE) || defined(UNDER_CE) -# define BOOST_NO_ANSI_APIS -// Windows CE does not have a conforming signature for swprintf -# define BOOST_NO_SWPRINTF -#else -# define BOOST_HAS_GETSYSTEMTIMEASFILETIME -# define BOOST_HAS_THREADEX -# define BOOST_HAS_GETSYSTEMTIMEASFILETIME -#endif - -// -// Windows Runtime -// -#if defined(WINAPI_FAMILY) && \ - (WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) -# define BOOST_NO_ANSI_APIS -#endif - -#ifndef BOOST_DISABLE_WIN32 -// WEK: Added -#define BOOST_HAS_FTIME -#define BOOST_WINDOWS 1 - -#endif diff --git a/native_client/boost_locale/boost/config/platform/zos.hpp b/native_client/boost_locale/boost/config/platform/zos.hpp deleted file mode 100644 index fa77999edc..0000000000 --- a/native_client/boost_locale/boost/config/platform/zos.hpp +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2017 Dynatrace -// -// Distributed under the Boost Software License, Version 1.0. -// See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt - -// See http://www.boost.org for most recent version. - -// Platform setup for IBM z/OS. - -#define BOOST_PLATFORM "IBM z/OS" - -#include // For __UU, __C99, __TR1, ... - -#if defined(__UU) -# define BOOST_HAS_GETTIMEOFDAY -#endif - -#if defined(_OPEN_THREADS) || defined(__SUSV3_THR) -# define BOOST_HAS_PTHREADS -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_THREADS -#endif - -#if defined(__SUSV3) || defined(__SUSV3_THR) -# define BOOST_HAS_SCHED_YIELD -#endif - -#define BOOST_HAS_SIGACTION -#define BOOST_HAS_UNISTD_H -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_NL_TYPES_H diff --git a/native_client/boost_locale/boost/config/requires_threads.hpp b/native_client/boost_locale/boost/config/requires_threads.hpp deleted file mode 100644 index cfaff23027..0000000000 --- a/native_client/boost_locale/boost/config/requires_threads.hpp +++ /dev/null @@ -1,92 +0,0 @@ -// (C) Copyright John Maddock 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - - -#ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP -#define BOOST_CONFIG_REQUIRES_THREADS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_DISABLE_THREADS) - -// -// special case to handle versions of gcc which don't currently support threads: -// -#if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG)) -// -// this is checked up to gcc 3.3: -// -#if defined(__sgi) || defined(__hpux) -# error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)" -#endif - -#endif - -# error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" - -#elif !defined(BOOST_HAS_THREADS) - -# if defined __COMO__ -// Comeau C++ -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)" - -#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) -// Intel -#ifdef _WIN32 -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" -#else -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp" -#endif - -# elif defined __GNUC__ -// GNU C++: -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" - -#elif defined __sgi -// SGI MIPSpro C++ -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE" - -#elif defined __DECCXX -// Compaq Tru64 Unix cxx -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread" - -#elif defined __BORLANDC__ -// Borland -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM" - -#elif defined __MWERKS__ -// Metrowerks CodeWarrior -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd" - -#elif defined __SUNPRO_CC -// Sun Workshop Compiler C++ -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" - -#elif defined __HP_aCC -// HP aCC -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" - -#elif defined(__IBMCPP__) -// IBM Visual Age -# error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler" - -#elif defined _MSC_VER -// Microsoft Visual C++ -// -// Must remain the last #elif since some other vendors (Metrowerks, for -// example) also #define _MSC_VER -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" - -#else - -# error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use" - -#endif // compilers - -#endif // BOOST_HAS_THREADS - -#endif // BOOST_CONFIG_REQUIRES_THREADS_HPP diff --git a/native_client/boost_locale/boost/config/stdlib/dinkumware.hpp b/native_client/boost_locale/boost/config/stdlib/dinkumware.hpp deleted file mode 100644 index daac5dfb43..0000000000 --- a/native_client/boost_locale/boost/config/stdlib/dinkumware.hpp +++ /dev/null @@ -1,251 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright David Abrahams 2002. -// (C) Copyright Guillaume Melquiond 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Dinkumware standard library config: - -#if !defined(_YVALS) && !defined(_CPPLIB_VER) -#include -#if !defined(_YVALS) && !defined(_CPPLIB_VER) -#error This is not the Dinkumware lib! -#endif -#endif - - -#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306) - // full dinkumware 3.06 and above - // fully conforming provided the compiler supports it: -# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h -# define BOOST_NO_STDC_NAMESPACE -# endif -# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC) -# define BOOST_NO_STD_ALLOCATOR -# endif -# define BOOST_HAS_PARTIAL_STD_ALLOCATOR -# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) - // if this lib version is set up for vc6 then there is no std::use_facet: -# define BOOST_NO_STD_USE_FACET -# define BOOST_HAS_TWO_ARG_USE_FACET - // C lib functions aren't in namespace std either: -# define BOOST_NO_STDC_NAMESPACE - // and nor is -# define BOOST_NO_EXCEPTION_STD_NAMESPACE -# endif -// There's no numeric_limits support unless _LONGLONG is defined: -# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310) -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -# endif -// 3.06 appears to have (non-sgi versions of) & , -// and no at all -#else -# define BOOST_MSVC_STD_ITERATOR 1 -# define BOOST_NO_STD_ITERATOR -# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS -# define BOOST_NO_STD_ALLOCATOR -# define BOOST_NO_STDC_NAMESPACE -# define BOOST_NO_STD_USE_FACET -# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN -# define BOOST_HAS_MACRO_USE_FACET -# ifndef _CPPLIB_VER - // Updated Dinkum library defines this, and provides - // its own min and max definitions, as does MTA version. -# ifndef __MTA__ -# define BOOST_NO_STD_MIN_MAX -# endif -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -# endif -#endif - -// -// std extension namespace is stdext for vc7.1 and later, -// the same applies to other compilers that sit on top -// of vc7.1 (Intel and Comeau): -// -#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__) -# define BOOST_STD_EXTENSION_NAMESPACE stdext -#endif - - -#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) - // if we're using a dinkum lib that's - // been configured for VC6/7 then there is - // no iterator traits (true even for icl) -# define BOOST_NO_STD_ITERATOR_TRAITS -#endif - -#if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310) -// Intel C++ chokes over any non-trivial use of -// this may be an overly restrictive define, but regex fails without it: -# define BOOST_NO_STD_LOCALE -#endif - -// Fix for VC++ 8.0 on up ( I do not have a previous version to test ) -// or clang-cl. If exceptions are off you must manually include the -// header before including the header. Admittedly -// trying to use Boost libraries or the standard C++ libraries without -// exception support is not suggested but currently clang-cl ( v 3.4 ) -// does not support exceptions and must be compiled with exceptions off. -#if !_HAS_EXCEPTIONS && ((defined(BOOST_MSVC) && BOOST_MSVC >= 1400) || (defined(__clang__) && defined(_MSC_VER))) -#include -#endif -#include -#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) -# define BOOST_NO_STD_TYPEINFO -#endif - -// C++0x headers implemented in 520 (as shipped by Microsoft) -// -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520 -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_HDR_FORWARD_LIST -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_SMART_PTR -#endif - -#if ((!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_CXX11_HDR_TUPLE)) \ - && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 610) -# define BOOST_NO_CXX11_HDR_TUPLE -#endif - -// C++0x headers implemented in 540 (as shipped by Microsoft) -// -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 540 -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -#endif - -// C++0x headers implemented in 610 (as shipped by Microsoft) -// -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 610 -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_ALLOCATOR -// 540 has std::align but it is not a conforming implementation -# define BOOST_NO_CXX11_STD_ALIGN -#endif - -// Before 650 std::pointer_traits has a broken rebind template -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650 -# define BOOST_NO_CXX11_POINTER_TRAITS -#elif defined(BOOST_MSVC) && BOOST_MSVC < 1910 -# define BOOST_NO_CXX11_POINTER_TRAITS -#endif - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif (__cplusplus < 201402) && !defined(_MSC_VER) -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#elif !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// C++14 features -#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) -# define BOOST_NO_CXX14_STD_EXCHANGE -#endif - -// C++17 features -#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1910) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) -# define BOOST_NO_CXX17_STD_APPLY -#endif -#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) -# define BOOST_NO_CXX17_STD_INVOKE -#endif - -#if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400) -// Intel's compiler can't handle this header yet: -# define BOOST_NO_CXX11_HDR_ATOMIC -#endif - - -// 520..610 have std::addressof, but it doesn't support functions -// -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650 -# define BOOST_NO_CXX11_ADDRESSOF -#endif - -// Bug specific to VC14, -// See https://connect.microsoft.com/VisualStudio/feedback/details/1348277/link-error-when-using-std-codecvt-utf8-utf16-char16-t -// and discussion here: http://blogs.msdn.com/b/vcblog/archive/2014/11/12/visual-studio-2015-preview-now-available.aspx?PageIndex=2 -#if defined(_CPPLIB_VER) && (_CPPLIB_VER == 650) -# define BOOST_NO_CXX11_HDR_CODECVT -#endif - -#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 650) -// If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr and std::random_shuffle are not available. -// See https://www.visualstudio.com/en-us/news/vs2015-vs.aspx#C++ -// and http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx -# if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0) -# define BOOST_NO_AUTO_PTR -# define BOOST_NO_CXX98_RANDOM_SHUFFLE -# define BOOST_NO_CXX98_FUNCTION_BASE -# define BOOST_NO_CXX98_BINDERS -# endif -#endif - - -// -// Things not supported by the CLR: -#ifdef _M_CEE -#ifndef BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_MUTEX -#endif -#ifndef BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_HDR_ATOMIC -#endif -#ifndef BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_FUTURE -#endif -#ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -#endif -#ifndef BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_THREAD -#endif -#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#ifndef BOOST_NO_CXX14_STD_EXCHANGE -# define BOOST_NO_CXX14_STD_EXCHANGE -#endif -#ifndef BOOST_NO_FENV_H -# define BOOST_NO_FENV_H -#endif -#endif - -#ifdef _CPPLIB_VER -# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER -#else -# define BOOST_DINKUMWARE_STDLIB 1 -#endif - -#ifdef _CPPLIB_VER -# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER) -#else -# define BOOST_STDLIB "Dinkumware standard library version 1.x" -#endif diff --git a/native_client/boost_locale/boost/config/stdlib/libcomo.hpp b/native_client/boost_locale/boost/config/stdlib/libcomo.hpp deleted file mode 100644 index ce83f082cc..0000000000 --- a/native_client/boost_locale/boost/config/stdlib/libcomo.hpp +++ /dev/null @@ -1,91 +0,0 @@ -// (C) Copyright John Maddock 2002 - 2003. -// (C) Copyright Jens Maurer 2002 - 2003. -// (C) Copyright Beman Dawes 2002 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Comeau STL: - -#if !defined(__LIBCOMO__) -# include -# if !defined(__LIBCOMO__) -# error "This is not the Comeau STL!" -# endif -#endif - -// -// std::streambuf is non-standard -// NOTE: versions of libcomo prior to beta28 have octal version numbering, -// e.g. version 25 is 21 (dec) -#if __LIBCOMO_VERSION__ <= 22 -# define BOOST_NO_STD_WSTREAMBUF -#endif - -#if (__LIBCOMO_VERSION__ <= 31) && defined(_WIN32) -#define BOOST_NO_SWPRINTF -#endif - -#if __LIBCOMO_VERSION__ >= 31 -# define BOOST_HAS_HASH -# define BOOST_HAS_SLIST -#endif - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FORWARD_LIST -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_POINTER_TRAITS -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_SMART_PTR -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#else -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// C++14 features -# define BOOST_NO_CXX14_STD_EXCHANGE - -// C++17 features -# define BOOST_NO_CXX17_STD_APPLY -# define BOOST_NO_CXX17_STD_INVOKE - -// -// Intrinsic type_traits support. -// The SGI STL has it's own __type_traits class, which -// has intrinsic compiler support with SGI's compilers. -// Whatever map SGI style type traits to boost equivalents: -// -#define BOOST_HAS_SGI_TYPE_TRAITS - -#define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__) diff --git a/native_client/boost_locale/boost/config/stdlib/libcpp.hpp b/native_client/boost_locale/boost/config/stdlib/libcpp.hpp deleted file mode 100644 index 9c58965f80..0000000000 --- a/native_client/boost_locale/boost/config/stdlib/libcpp.hpp +++ /dev/null @@ -1,124 +0,0 @@ -// (C) Copyright Christopher Jefferson 2011. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// config for libc++ -// Might need more in here later. - -#if !defined(_LIBCPP_VERSION) -# include -# if !defined(_LIBCPP_VERSION) -# error "This is not libc++!" -# endif -#endif - -#define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION) - -#define BOOST_HAS_THREADS - -#ifdef _LIBCPP_HAS_NO_VARIADICS -# define BOOST_NO_CXX11_HDR_TUPLE -#endif - -// BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11 -// allocator model. The C++11 allocator model requires a conforming -// std::allocator_traits which is only possible with C++11 template -// aliases since members rebind_alloc and rebind_traits require it. -#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES) -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_POINTER_TRAITS -#endif - -#if __cplusplus < 201103 -// -// These two appear to be somewhat useable in C++03 mode, there may be others... -// -//# define BOOST_NO_CXX11_HDR_ARRAY -//# define BOOST_NO_CXX11_HDR_FORWARD_LIST - -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_POINTER_TRAITS -# define BOOST_NO_CXX11_SMART_PTR -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_FUTURE -#elif _LIBCPP_VERSION < 3700 -// -// These appear to be unusable/incomplete so far: -// -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_FUTURE -#endif - - -#if _LIBCPP_VERSION < 3700 -// libc++ uses a non-standard messages_base -#define BOOST_NO_STD_MESSAGES -#endif - -// C++14 features -#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L) -# define BOOST_NO_CXX14_STD_EXCHANGE -#endif - -// C++17 features -#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L) -# define BOOST_NO_CXX17_STD_INVOKE -#endif -#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L) -# define BOOST_NO_CXX17_STD_APPLY -#endif -#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) -# define BOOST_NO_AUTO_PTR -#endif -#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) -# define BOOST_NO_CXX98_RANDOM_SHUFFLE -#endif -#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) -# define BOOST_NO_CXX98_BINDERS -#endif - -#if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL) -// This is a bit of a sledgehammer, because really it's just libc++abi that has no -// support for thread_local, leading to linker errors such as -// "undefined reference to `__cxa_thread_atexit'". It is fixed in the -// most recent releases of libc++abi though... -# define BOOST_NO_CXX11_THREAD_LOCAL -#endif - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus <= 201103 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// --- end --- diff --git a/native_client/boost_locale/boost/config/stdlib/libstdcpp3.hpp b/native_client/boost_locale/boost/config/stdlib/libstdcpp3.hpp deleted file mode 100644 index 9adbc8f171..0000000000 --- a/native_client/boost_locale/boost/config/stdlib/libstdcpp3.hpp +++ /dev/null @@ -1,346 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Jens Maurer 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// config for libstdc++ v3 -// not much to go in here: - -#define BOOST_GNU_STDLIB 1 - -#ifdef __GLIBCXX__ -#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) -#else -#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) -#endif - -#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) -# define BOOST_NO_CWCHAR -# define BOOST_NO_CWCTYPE -# define BOOST_NO_STD_WSTRING -# define BOOST_NO_STD_WSTREAMBUF -#endif - -#if defined(__osf__) && !defined(_REENTRANT) \ - && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) ) -// GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header -// file is included, therefore for consistency we define it here as well. -# define _REENTRANT -#endif - -#ifdef __GLIBCXX__ // gcc 3.4 and greater: -# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ - || defined(_GLIBCXX__PTHREADS) \ - || defined(_GLIBCXX_HAS_GTHREADS) \ - || defined(_WIN32) \ - || defined(_AIX) \ - || defined(__HAIKU__) - // - // If the std lib has thread support turned on, then turn it on in Boost - // as well. We do this because some gcc-3.4 std lib headers define _REENTANT - // while others do not... - // -# define BOOST_HAS_THREADS -# else -# define BOOST_DISABLE_THREADS -# endif -#elif defined(__GLIBCPP__) \ - && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \ - && !defined(_GLIBCPP__PTHREADS) - // disable thread support if the std lib was built single threaded: -# define BOOST_DISABLE_THREADS -#endif - -#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT) -// linux on arm apparently doesn't define _REENTRANT -// so just turn on threading support whenever the std lib is thread safe: -# define BOOST_HAS_THREADS -#endif - -#if !defined(_GLIBCPP_USE_LONG_LONG) \ - && !defined(_GLIBCXX_USE_LONG_LONG)\ - && defined(BOOST_HAS_LONG_LONG) -// May have been set by compiler/*.hpp, but "long long" without library -// support is useless. -# undef BOOST_HAS_LONG_LONG -#endif - -// Apple doesn't seem to reliably defined a *unix* macro -#if !defined(CYGWIN) && ( defined(__unix__) \ - || defined(__unix) \ - || defined(unix) \ - || defined(__APPLE__) \ - || defined(__APPLE) \ - || defined(APPLE)) -# include -#endif - -#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 -# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx -# define BOOST_HAS_SLIST -# define BOOST_HAS_HASH -# define BOOST_SLIST_HEADER -# if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) -# define BOOST_HASH_SET_HEADER -# define BOOST_HASH_MAP_HEADER -# else -# define BOOST_HASH_SET_HEADER -# define BOOST_HASH_MAP_HEADER -# endif -#endif - -// -// Decide whether we have C++11 support turned on: -// -#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103) -# define BOOST_LIBSTDCXX11 -#endif - -// -// Decide which version of libstdc++ we have, normally -// libstdc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly -// __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the libstdc++ -// developers. He also commented: -// -// "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in -// GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305. -// Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support -// than any release in the 4.2 series." -// -// Another resource for understanding libstdc++ features is: -// http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x -// -// However, using the GCC version number fails when the compiler is clang since this -// only ever claims to emulate GCC-4.2, see https://svn.boost.org/trac/boost/ticket/7473 -// for a long discussion on this issue. What we can do though is use clang's __has_include -// to detect the presence of a C++11 header that was introduced with a specific GCC release. -// We still have to be careful though as many such headers were buggy and/or incomplete when -// first introduced, so we only check for headers that were fully featured from day 1, and then -// use that to infer the underlying GCC version: -// -#ifdef __clang__ - -#if __has_include() -# define BOOST_LIBSTDCXX_VERSION 60100 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 50100 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40900 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40800 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40700 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40600 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40500 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40400 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40300 -#endif - -#if (BOOST_LIBSTDCXX_VERSION < 50100) -// libstdc++ does not define this function as it's deprecated in C++11, but clang still looks for it, -// defining it here is a terrible cludge, but should get things working: -extern "C" char *gets (char *__s); -#endif -// -// clang is unable to parse some GCC headers, add those workarounds here: -// -#if BOOST_LIBSTDCXX_VERSION < 50000 -# define BOOST_NO_CXX11_HDR_REGEX -#endif -// -// GCC 4.7.x has no __cxa_thread_atexit which -// thread_local objects require for cleanup: -// -#if BOOST_LIBSTDCXX_VERSION < 40800 -# define BOOST_NO_CXX11_THREAD_LOCAL -#endif -// -// Early clang versions can handle , not exactly sure which versions -// but certainly up to clang-3.8 and gcc-4.6: -// -#if (__clang_major__ < 5) -# if BOOST_LIBSTDCXX_VERSION < 40800 -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_CHRONO -# endif -#endif - -// -// GCC 4.8 and 9 add working versions of and respectively. -// However, we have no test for these as the headers were present but broken -// in early GCC versions. -// -#endif - -#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) && (__cplusplus >= 201103L) -// -// Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't -// set __GNUC__ -// -#if __SUNPRO_CC >= 0x5140 -#define BOOST_LIBSTDCXX_VERSION 50100 -#else -#define BOOST_LIBSTDCXX_VERSION 40800 -#endif -#endif - -#if !defined(BOOST_LIBSTDCXX_VERSION) -# define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) -#endif - -// std::auto_ptr isn't provided with _GLIBCXX_DEPRECATED=0 (GCC 4.5 and earlier) -// or _GLIBCXX_USE_DEPRECATED=0 (GCC 4.6 and later). -#if defined(BOOST_LIBSTDCXX11) -# if BOOST_LIBSTDCXX_VERSION < 40600 -# if !_GLIBCXX_DEPRECATED -# define BOOST_NO_AUTO_PTR -# endif -# elif !_GLIBCXX_USE_DEPRECATED -# define BOOST_NO_AUTO_PTR -# endif -#endif - -// C++0x headers in GCC 4.3.0 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11) -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -#endif - -// C++0x headers in GCC 4.4.0 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 40400) || !defined(BOOST_LIBSTDCXX11) -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FORWARD_LIST -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_SMART_PTR -#else -# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG -# define BOOST_HAS_TR1_COMPLEX_OVERLOADS -#endif - -// C++0x features in GCC 4.5.0 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 40500) || !defined(BOOST_LIBSTDCXX11) -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_RANDOM -#endif - -// C++0x features in GCC 4.6.0 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11) -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_ADDRESSOF -#endif - -// C++0x features in GCC 4.7.0 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 40700) || !defined(BOOST_LIBSTDCXX11) -// Note that although existed prior to 4.7, "steady_clock" is spelled "monotonic_clock" -// so 4.7.0 is the first truly conforming one. -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_POINTER_TRAITS -#endif -// C++0x features in GCC 4.8.0 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 40800) || !defined(BOOST_LIBSTDCXX11) -// Note that although existed prior to gcc 4.8 it was largely unimplemented for many types: -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_HDR_THREAD -#endif -// C++0x features in GCC 4.9.0 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) -// Although is present and compilable against, the actual implementation is not functional -// even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively. -# define BOOST_NO_CXX11_HDR_REGEX -#endif -#if (BOOST_LIBSTDCXX_VERSION < 40900) || (__cplusplus <= 201103) -# define BOOST_NO_CXX14_STD_EXCHANGE -#endif - -#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7))) -// As of clang-3.6, libstdc++ header throws up errors with clang: -# define BOOST_NO_CXX11_HDR_ATOMIC -#endif -// -// C++0x features in GCC 5.1 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 50100) || !defined(BOOST_LIBSTDCXX11) -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_STD_ALIGN -#endif - -// -// C++17 features in GCC 6.1 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 60100) || (__cplusplus <= 201402L) -# define BOOST_NO_CXX17_STD_INVOKE -#endif -#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L) -# define BOOST_NO_CXX17_STD_APPLY -#endif - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus <= 201103 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#elif __cplusplus < 201402 || (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// -// Headers not present on Solaris with the Oracle compiler: -#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140) -#define BOOST_NO_CXX11_HDR_FUTURE -#define BOOST_NO_CXX11_HDR_FORWARD_LIST -#define BOOST_NO_CXX11_HDR_ATOMIC -// shared_ptr is present, but is not convertible to bool -// which causes all kinds of problems especially in Boost.Thread -// but probably elsewhere as well. -#define BOOST_NO_CXX11_SMART_PTR -#endif - -#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) - // Headers not always available: -# ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# endif -# ifndef BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_MUTEX -# endif -# ifndef BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_THREAD -# endif -# ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -# endif -#endif - -#if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX) -// Timed mutexes are not always available: -# define BOOST_NO_CXX11_HDR_MUTEX -#endif - -// --- end --- diff --git a/native_client/boost_locale/boost/config/stdlib/modena.hpp b/native_client/boost_locale/boost/config/stdlib/modena.hpp deleted file mode 100644 index 98bdc3fb3e..0000000000 --- a/native_client/boost_locale/boost/config/stdlib/modena.hpp +++ /dev/null @@ -1,77 +0,0 @@ -// (C) Copyright Jens Maurer 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Modena C++ standard library (comes with KAI C++) - -#if !defined(MSIPL_COMPILE_H) -# include -# if !defined(__MSIPL_COMPILE_H) -# error "This is not the Modena C++ library!" -# endif -#endif - -#ifndef MSIPL_NL_TYPES -#define BOOST_NO_STD_MESSAGES -#endif - -#ifndef MSIPL_WCHART -#define BOOST_NO_STD_WSTRING -#endif - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FORWARD_LIST -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_POINTER_TRAITS -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_SMART_PTR -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#else -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// C++14 features -# define BOOST_NO_CXX14_STD_EXCHANGE - -// C++17 features -# define BOOST_NO_CXX17_STD_APPLY -# define BOOST_NO_CXX17_STD_INVOKE - -#define BOOST_STDLIB "Modena C++ standard library" - - - - - diff --git a/native_client/boost_locale/boost/config/stdlib/msl.hpp b/native_client/boost_locale/boost/config/stdlib/msl.hpp deleted file mode 100644 index 9606a9aeca..0000000000 --- a/native_client/boost_locale/boost/config/stdlib/msl.hpp +++ /dev/null @@ -1,96 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Darin Adler 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Metrowerks standard library: - -#ifndef __MSL_CPP__ -# include -# ifndef __MSL_CPP__ -# error This is not the MSL standard library! -# endif -#endif - -#if __MSL_CPP__ >= 0x6000 // Pro 6 -# define BOOST_HAS_HASH -# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks -#endif -#define BOOST_HAS_SLIST - -#if __MSL_CPP__ < 0x6209 -# define BOOST_NO_STD_MESSAGES -#endif - -// check C lib version for -#include - -#if defined(__MSL__) && (__MSL__ >= 0x5000) -# define BOOST_HAS_STDINT_H -# if !defined(__PALMOS_TRAPS__) -# define BOOST_HAS_UNISTD_H -# endif - // boilerplate code: -# include -#endif - -#if defined(_MWMT) || _MSL_THREADSAFE -# define BOOST_HAS_THREADS -#endif - -#ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG -# define BOOST_NO_STD_USE_FACET -# define BOOST_HAS_TWO_ARG_USE_FACET -#endif - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FORWARD_LIST -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_POINTER_TRAITS -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_SMART_PTR -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#else -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// C++14 features -# define BOOST_NO_CXX14_STD_EXCHANGE - -// C++17 features -# define BOOST_NO_CXX17_STD_APPLY -# define BOOST_NO_CXX17_STD_INVOKE - -#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) diff --git a/native_client/boost_locale/boost/config/stdlib/roguewave.hpp b/native_client/boost_locale/boost/config/stdlib/roguewave.hpp deleted file mode 100644 index 380d0ff375..0000000000 --- a/native_client/boost_locale/boost/config/stdlib/roguewave.hpp +++ /dev/null @@ -1,206 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001. -// (C) Copyright David Abrahams 2003. -// (C) Copyright Boris Gubenko 2007. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// Rogue Wave std lib: - -#define BOOST_RW_STDLIB 1 - -#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) -# include -# if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) -# error This is not the Rogue Wave standard library -# endif -#endif -// -// figure out a consistent version number: -// -#ifndef _RWSTD_VER -# define BOOST_RWSTD_VER 0x010000 -#elif _RWSTD_VER < 0x010000 -# define BOOST_RWSTD_VER (_RWSTD_VER << 8) -#else -# define BOOST_RWSTD_VER _RWSTD_VER -#endif - -#ifndef _RWSTD_VER -# define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)" -#elif _RWSTD_VER < 0x04010200 - # define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER) -#else -# ifdef _RWSTD_VER_STR -# define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR -# else -# define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER) -# endif -#endif - -// -// Prior to version 2.2.0 the primary template for std::numeric_limits -// does not have compile time constants, even though specializations of that -// template do: -// -#if BOOST_RWSTD_VER < 0x020200 -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -#endif - -// Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the -// library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817): -#if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550)) -# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS -# endif - -// -// Borland version of numeric_limits lacks __int64 specialisation: -// -#ifdef __BORLANDC__ -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -#endif - -// -// No std::iterator if it can't figure out default template args: -// -#if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000) -# define BOOST_NO_STD_ITERATOR -#endif - -// -// No iterator traits without partial specialization: -// -#if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC) -# define BOOST_NO_STD_ITERATOR_TRAITS -#endif - -// -// Prior to version 2.0, std::auto_ptr was buggy, and there were no -// new-style iostreams, and no conformant std::allocator: -// -#if (BOOST_RWSTD_VER < 0x020000) -# define BOOST_NO_AUTO_PTR -# define BOOST_NO_STRINGSTREAM -# define BOOST_NO_STD_ALLOCATOR -# define BOOST_NO_STD_LOCALE -#endif - -// -// No template iterator constructors without member template support: -// -#if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES) -# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS -#endif - -// -// RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use -// (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR -// on HP aCC systems even though the allocator is in fact broken): -// -#if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100) -# define BOOST_NO_STD_ALLOCATOR -#endif - -// -// If we have a std::locale, we still may not have std::use_facet: -// -#if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE) -# define BOOST_NO_STD_USE_FACET -# define BOOST_HAS_TWO_ARG_USE_FACET -#endif - -// -// There's no std::distance prior to version 2, or without -// partial specialization support: -// -#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) - #define BOOST_NO_STD_DISTANCE -#endif - -// -// Some versions of the rogue wave library don't have assignable -// OutputIterators: -// -#if BOOST_RWSTD_VER < 0x020100 -# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN -#endif - -// -// Disable BOOST_HAS_LONG_LONG when the library has no support for it. -// -#if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG) -# undef BOOST_HAS_LONG_LONG -#endif - -// -// check that on HP-UX, the proper RW library is used -// -#if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD) -# error "Boost requires Standard RW library. Please compile and link with -AA" -#endif - -// -// Define macros specific to RW V2.2 on HP-UX -// -#if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100) -# ifndef __HP_TC1_MAKE_PAIR -# define __HP_TC1_MAKE_PAIR -# endif -# ifndef _HP_INSTANTIATE_STD2_VL -# define _HP_INSTANTIATE_STD2_VL -# endif -#endif - -#if _RWSTD_VER < 0x05000000 -# define BOOST_NO_CXX11_HDR_ARRAY -#endif -// type_traits header is incomplete: -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -// -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FORWARD_LIST -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_POINTER_TRAITS -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_SMART_PTR -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#else -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// C++14 features -# define BOOST_NO_CXX14_STD_EXCHANGE - -// C++17 features -# define BOOST_NO_CXX17_STD_APPLY -# define BOOST_NO_CXX17_STD_INVOKE diff --git a/native_client/boost_locale/boost/config/stdlib/sgi.hpp b/native_client/boost_locale/boost/config/stdlib/sgi.hpp deleted file mode 100644 index 5016ff627b..0000000000 --- a/native_client/boost_locale/boost/config/stdlib/sgi.hpp +++ /dev/null @@ -1,166 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001. -// (C) Copyright Jens Maurer 2001 - 2003. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// generic SGI STL: - -#if !defined(__STL_CONFIG_H) -# include -# if !defined(__STL_CONFIG_H) -# error "This is not the SGI STL!" -# endif -#endif - -// -// No std::iterator traits without partial specialisation: -// -#if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) -# define BOOST_NO_STD_ITERATOR_TRAITS -#endif - -// -// No std::stringstream with gcc < 3 -// -#if defined(__GNUC__) && (__GNUC__ < 3) && \ - ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \ - !defined(__STL_USE_NEW_IOSTREAMS) || \ - defined(__APPLE_CC__) - // Note that we only set this for GNU C++ prior to 2.95 since the - // latest patches for that release do contain a minimal - // If you are running a 2.95 release prior to 2.95.3 then this will need - // setting, but there is no way to detect that automatically (other - // than by running the configure script). - // Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't - // have . -# define BOOST_NO_STRINGSTREAM -#endif - -// Apple doesn't seem to reliably defined a *unix* macro -#if !defined(CYGWIN) && ( defined(__unix__) \ - || defined(__unix) \ - || defined(unix) \ - || defined(__APPLE__) \ - || defined(__APPLE) \ - || defined(APPLE)) -# include -#endif - - -// -// Assume no std::locale without own iostreams (this may be an -// incorrect assumption in some cases): -// -#if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS) -# define BOOST_NO_STD_LOCALE -#endif - -// -// Original native SGI streams have non-standard std::messages facet: -// -#if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS) -# define BOOST_NO_STD_LOCALE -#endif - -// -// SGI's new iostreams have missing "const" in messages<>::open -// -#if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS) -# define BOOST_NO_STD_MESSAGES -#endif - -// -// No template iterator constructors, or std::allocator -// without member templates: -// -#if !defined(__STL_MEMBER_TEMPLATES) -# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS -# define BOOST_NO_STD_ALLOCATOR -#endif - -// -// We always have SGI style hash_set, hash_map, and slist: -// -#define BOOST_HAS_HASH -#define BOOST_HAS_SLIST - -// -// If this is GNU libstdc++2, then no and no std::wstring: -// -#if (defined(__GNUC__) && (__GNUC__ < 3)) -# include -# if defined(__BASTRING__) -# define BOOST_NO_LIMITS -// Note: will provide compile-time constants -# undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -# define BOOST_NO_STD_WSTRING -# endif -#endif - -// -// There is no standard iterator unless we have namespace support: -// -#if !defined(__STL_USE_NAMESPACES) -# define BOOST_NO_STD_ITERATOR -#endif - -// -// Intrinsic type_traits support. -// The SGI STL has it's own __type_traits class, which -// has intrinsic compiler support with SGI's compilers. -// Whatever map SGI style type traits to boost equivalents: -// -#define BOOST_HAS_SGI_TYPE_TRAITS - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FORWARD_LIST -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_POINTER_TRAITS -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_SMART_PTR -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#else -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// C++14 features -# define BOOST_NO_CXX14_STD_EXCHANGE - -// C++17 features -# define BOOST_NO_CXX17_STD_APPLY -# define BOOST_NO_CXX17_STD_INVOKE - -#define BOOST_STDLIB "SGI standard library" diff --git a/native_client/boost_locale/boost/config/stdlib/stlport.hpp b/native_client/boost_locale/boost/config/stdlib/stlport.hpp deleted file mode 100644 index 81e6ccf016..0000000000 --- a/native_client/boost_locale/boost/config/stdlib/stlport.hpp +++ /dev/null @@ -1,256 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// (C) Copyright Darin Adler 2001. -// (C) Copyright Jens Maurer 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -// STLPort standard library config: - -#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) -# include -# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) -# error "This is not STLPort!" -# endif -#endif - -// Apple doesn't seem to reliably defined a *unix* macro -#if !defined(CYGWIN) && ( defined(__unix__) \ - || defined(__unix) \ - || defined(unix) \ - || defined(__APPLE__) \ - || defined(__APPLE) \ - || defined(APPLE)) -# include -#endif - -// -// __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -// for versions prior to 4.1(beta) -// -#if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400) -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -#endif - -// -// If STLport thinks that there is no partial specialisation, then there is no -// std::iterator traits: -// -#if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION)) -# define BOOST_NO_STD_ITERATOR_TRAITS -#endif - -// -// No new style iostreams on GCC without STLport's iostreams enabled: -// -#if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS)) -# define BOOST_NO_STRINGSTREAM -#endif - -// -// No new iostreams implies no std::locale, and no std::stringstream: -// -#if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS) -# define BOOST_NO_STD_LOCALE -# define BOOST_NO_STRINGSTREAM -#endif - -// -// If the streams are not native, and we have a "using ::x" compiler bug -// then the io stream facets are not available in namespace std:: -// -#ifdef _STLPORT_VERSION -# if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) -# define BOOST_NO_STD_LOCALE -# endif -#else -# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) -# define BOOST_NO_STD_LOCALE -# endif -#endif - -#if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520) -# define BOOST_HAS_TR1_UNORDERED_SET -# define BOOST_HAS_TR1_UNORDERED_MAP -#endif -// -// Without member template support enabled, their are no template -// iterate constructors, and no std::allocator: -// -#if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES)) -# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS -# define BOOST_NO_STD_ALLOCATOR -#endif -// -// however we always have at least a partial allocator: -// -#define BOOST_HAS_PARTIAL_STD_ALLOCATOR - -#if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) -# define BOOST_NO_STD_ALLOCATOR -#endif - -#if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) -# define BOOST_NO_STD_ALLOCATOR -#endif - -// -// If STLport thinks there is no wchar_t at all, then we have to disable -// the support for the relevant specilazations of std:: templates. -// -#if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT) -# ifndef BOOST_NO_STD_WSTRING -# define BOOST_NO_STD_WSTRING -# endif -# ifndef BOOST_NO_STD_WSTREAMBUF -# define BOOST_NO_STD_WSTREAMBUF -# endif -#endif - -// -// We always have SGI style hash_set, hash_map, and slist: -// -#ifndef _STLP_NO_EXTENSIONS -#define BOOST_HAS_HASH -#define BOOST_HAS_SLIST -#endif - -// -// STLport does a good job of importing names into namespace std::, -// but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our -// workaround does not conflict with STLports: -// -// -// Harold Howe says: -// Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with -// BCB6 does cause problems. If we detect C++ Builder, then don't define -// BOOST_NO_STDC_NAMESPACE -// -#if !defined(__BORLANDC__) && !defined(__DMC__) -// -// If STLport is using it's own namespace, and the real names are in -// the global namespace, then we duplicate STLport's using declarations -// (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't -// necessarily import all the names we need into namespace std:: -// -# if (defined(__STL_IMPORT_VENDOR_CSTD) \ - || defined(__STL_USE_OWN_NAMESPACE) \ - || defined(_STLP_IMPORT_VENDOR_CSTD) \ - || defined(_STLP_USE_OWN_NAMESPACE)) \ - && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD)) -# define BOOST_NO_STDC_NAMESPACE -# define BOOST_NO_EXCEPTION_STD_NAMESPACE -# endif -#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 -// STLport doesn't import std::abs correctly: -#include -namespace std { using ::abs; } -// and strcmp/strcpy don't get imported either ('cos they are macros) -#include -#ifdef strcpy -# undef strcpy -#endif -#ifdef strcmp -# undef strcmp -#endif -#ifdef _STLP_VENDOR_CSTD -namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; } -#endif -#endif - -// -// std::use_facet may be non-standard, uses a class instead: -// -#if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) -# define BOOST_NO_STD_USE_FACET -# define BOOST_HAS_STLP_USE_FACET -#endif - -// -// If STLport thinks there are no wide functions, etc. is not working; but -// only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import -// into std:: ourselves). -// -#if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE) -# define BOOST_NO_CWCHAR -# define BOOST_NO_CWCTYPE -#endif - -// -// If STLport for some reason was configured so that it thinks that wchar_t -// is not an intrinsic type, then we have to disable the support for it as -// well (we would be missing required specializations otherwise). -// -#if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT) -# undef BOOST_NO_INTRINSIC_WCHAR_T -# define BOOST_NO_INTRINSIC_WCHAR_T -#endif - -// -// Borland ships a version of STLport with C++ Builder 6 that lacks -// hashtables and the like: -// -#if defined(__BORLANDC__) && (__BORLANDC__ == 0x560) -# undef BOOST_HAS_HASH -#endif - -// -// gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max -// -#if defined(__GNUC__) && (__GNUC__ < 3) -# include // for std::min and std::max -# define BOOST_USING_STD_MIN() ((void)0) -# define BOOST_USING_STD_MAX() ((void)0) -namespace boost { using std::min; using std::max; } -#endif - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FORWARD_LIST -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_POINTER_TRAITS -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_SMART_PTR -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#else -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// C++14 features -# define BOOST_NO_CXX14_STD_EXCHANGE - -// C++17 features -# define BOOST_NO_CXX17_STD_APPLY -# define BOOST_NO_CXX17_STD_INVOKE - -#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) diff --git a/native_client/boost_locale/boost/config/stdlib/vacpp.hpp b/native_client/boost_locale/boost/config/stdlib/vacpp.hpp deleted file mode 100644 index c159af259f..0000000000 --- a/native_client/boost_locale/boost/config/stdlib/vacpp.hpp +++ /dev/null @@ -1,72 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for most recent version. - -#if __IBMCPP__ <= 501 -# define BOOST_NO_STD_ALLOCATOR -#endif - -#define BOOST_HAS_MACRO_USE_FACET -#define BOOST_NO_STD_MESSAGES - -// Apple doesn't seem to reliably defined a *unix* macro -#if !defined(CYGWIN) && ( defined(__unix__) \ - || defined(__unix) \ - || defined(unix) \ - || defined(__APPLE__) \ - || defined(__APPLE) \ - || defined(APPLE)) -# include -#endif - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FORWARD_LIST -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_POINTER_TRAITS -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_SMART_PTR -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#else -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// C++14 features -# define BOOST_NO_CXX14_STD_EXCHANGE - -// C++17 features -# define BOOST_NO_CXX17_STD_APPLY -# define BOOST_NO_CXX17_STD_INVOKE - -#define BOOST_STDLIB "Visual Age default standard library" diff --git a/native_client/boost_locale/boost/config/stdlib/xlcpp_zos.hpp b/native_client/boost_locale/boost/config/stdlib/xlcpp_zos.hpp deleted file mode 100644 index dce40f5090..0000000000 --- a/native_client/boost_locale/boost/config/stdlib/xlcpp_zos.hpp +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2017 Dynatrace -// -// Distributed under the Boost Software License, Version 1.0. -// See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt - -// See http://www.boost.org for most recent version. - -// Standard library setup for IBM z/OS XL C/C++ compiler. - -// Oldest library version currently supported is 2.1 (V2R1) -#if __TARGET_LIB__ < 0x42010000 -# error "Library version not supported or configured - please reconfigure" -#endif - -#if __TARGET_LIB__ > 0x42010000 -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown library version - please run the configure tests and report the results" -# endif -#endif - -#define BOOST_STDLIB "IBM z/OS XL C/C++ standard library" - -#define BOOST_HAS_MACRO_USE_FACET - -#define BOOST_NO_CXX11_HDR_TYPE_TRAITS -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST - -#define BOOST_NO_CXX11_ADDRESSOF -#define BOOST_NO_CXX11_SMART_PTR -#define BOOST_NO_CXX11_ATOMIC_SMART_PTR -#define BOOST_NO_CXX11_NUMERIC_LIMITS -#define BOOST_NO_CXX11_ALLOCATOR -#define BOOST_NO_CXX11_POINTER_TRAITS -#define BOOST_NO_CXX11_HDR_FUNCTIONAL -#define BOOST_NO_CXX11_HDR_UNORDERED_SET -#define BOOST_NO_CXX11_HDR_UNORDERED_MAP -#define BOOST_NO_CXX11_HDR_TYPEINDEX -#define BOOST_NO_CXX11_HDR_TUPLE -#define BOOST_NO_CXX11_HDR_THREAD -#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -#define BOOST_NO_CXX11_HDR_REGEX -#define BOOST_NO_CXX11_HDR_RATIO -#define BOOST_NO_CXX11_HDR_RANDOM -#define BOOST_NO_CXX11_HDR_MUTEX -#define BOOST_NO_CXX11_HDR_FUTURE -#define BOOST_NO_CXX11_HDR_FORWARD_LIST -#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -#define BOOST_NO_CXX11_HDR_CODECVT -#define BOOST_NO_CXX11_HDR_CHRONO -#define BOOST_NO_CXX11_HDR_ATOMIC -#define BOOST_NO_CXX11_HDR_ARRAY -#define BOOST_NO_CXX11_STD_ALIGN - -#define BOOST_NO_CXX14_STD_EXCHANGE -#define BOOST_NO_CXX14_HDR_SHARED_MUTEX - -#define BOOST_NO_CXX17_STD_INVOKE -#define BOOST_NO_CXX17_STD_APPLY diff --git a/native_client/boost_locale/boost/config/user.hpp b/native_client/boost_locale/boost/config/user.hpp deleted file mode 100644 index 28e7476afd..0000000000 --- a/native_client/boost_locale/boost/config/user.hpp +++ /dev/null @@ -1,133 +0,0 @@ -// boost/config/user.hpp ---------------------------------------------------// - -// (C) Copyright John Maddock 2001. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// Do not check in modified versions of this file, -// This file may be customized by the end user, but not by boost. - -// -// Use this file to define a site and compiler specific -// configuration policy: -// - -// define this to locate a compiler config file: -// #define BOOST_COMPILER_CONFIG - -// define this to locate a stdlib config file: -// #define BOOST_STDLIB_CONFIG - -// define this to locate a platform config file: -// #define BOOST_PLATFORM_CONFIG - -// define this to disable compiler config, -// use if your compiler config has nothing to set: -// #define BOOST_NO_COMPILER_CONFIG - -// define this to disable stdlib config, -// use if your stdlib config has nothing to set: -// #define BOOST_NO_STDLIB_CONFIG - -// define this to disable platform config, -// use if your platform config has nothing to set: -// #define BOOST_NO_PLATFORM_CONFIG - -// define this to disable all config options, -// excluding the user config. Use if your -// setup is fully ISO compliant, and has no -// useful extensions, or for autoconf generated -// setups: -// #define BOOST_NO_CONFIG - -// define this to make the config "optimistic" -// about unknown compiler versions. Normally -// unknown compiler versions are assumed to have -// all the defects of the last known version, however -// setting this flag, causes the config to assume -// that unknown compiler versions are fully conformant -// with the standard: -// #define BOOST_STRICT_CONFIG - -// define this to cause the config to halt compilation -// with an #error if it encounters anything unknown -- -// either an unknown compiler version or an unknown -// compiler/platform/library: -// #define BOOST_ASSERT_CONFIG - - -// define if you want to disable threading support, even -// when available: -// #define BOOST_DISABLE_THREADS - -// define when you want to disable Win32 specific features -// even when available: -// #define BOOST_DISABLE_WIN32 - -// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any -// prefix/suffix headers that normally control things like struct -// packing and alignment. -// #define BOOST_DISABLE_ABI_HEADERS - -// BOOST_ABI_PREFIX: A prefix header to include in place of whatever -// boost.config would normally select, any replacement should set up -// struct packing and alignment options as required. -// #define BOOST_ABI_PREFIX my-header-name - -// BOOST_ABI_SUFFIX: A suffix header to include in place of whatever -// boost.config would normally select, any replacement should undo -// the effects of the prefix header. -// #define BOOST_ABI_SUFFIX my-header-name - -// BOOST_ALL_DYN_LINK: Forces all libraries that have separate source, -// to be linked as dll's rather than static libraries on Microsoft Windows -// (this macro is used to turn on __declspec(dllimport) modifiers, so that -// the compiler knows which symbols to look for in a dll rather than in a -// static library). Note that there may be some libraries that can only -// be linked in one way (statically or dynamically), in these cases this -// macro has no effect. -// #define BOOST_ALL_DYN_LINK - -// BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll -// rather than a static library on Microsoft Windows: replace the WHATEVER -// part of the macro name with the name of the library that you want to -// dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or -// BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) -// modifiers, so that the compiler knows which symbols to look for in a dll -// rather than in a static library). -// Note that there may be some libraries that can only -// be linked in one way (statically or dynamically), -// in these cases this macro is unsupported. -// #define BOOST_WHATEVER_DYN_LINK - -// BOOST_ALL_NO_LIB: Tells the config system not to automatically select -// which libraries to link against. -// Normally if a compiler supports #pragma lib, then the correct library -// build variant will be automatically selected and linked against, -// simply by the act of including one of that library's headers. -// This macro turns that feature off. -// #define BOOST_ALL_NO_LIB - -// BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically -// select which library to link against for library "whatever", -// replace WHATEVER in the macro name with the name of the library; -// for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB. -// Normally if a compiler supports #pragma lib, then the correct library -// build variant will be automatically selected and linked against, simply -// by the act of including one of that library's headers. This macro turns -// that feature off. -// #define BOOST_WHATEVER_NO_LIB - -// BOOST_LIB_BUILDID: Set to the same value as the value passed to Boost.Build's -// --buildid command line option. For example if you built using: -// -// bjam address-model=64 --buildid=amd64 -// -// then compile your code with: -// -// -DBOOST_LIB_BUILDID = amd64 -// -// to ensure the correct libraries are selected at link time. -// #define BOOST_LIB_BUILDID amd64 - diff --git a/native_client/boost_locale/boost/config/warning_disable.hpp b/native_client/boost_locale/boost/config/warning_disable.hpp deleted file mode 100644 index fea8e829f1..0000000000 --- a/native_client/boost_locale/boost/config/warning_disable.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright John Maddock 2008 -// Use, modification, and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// This file exists to turn off some overly-pedantic warning emitted -// by certain compilers. You should include this header only in: -// -// * A test case, before any other headers, or, -// * A library source file before any other headers. -// -// IT SHOULD NOT BE INCLUDED BY ANY BOOST HEADER. -// -// YOU SHOULD NOT INCLUDE IT IF YOU CAN REASONABLY FIX THE WARNING. -// -// The only warnings disabled here are those that are: -// -// * Quite unreasonably pedantic. -// * Generally only emitted by a single compiler. -// * Can't easily be fixed: for example if the vendors own std lib -// code emits these warnings! -// -// Note that THIS HEADER MUST NOT INCLUDE ANY OTHER HEADERS: -// not even std library ones! Doing so may turn the warning -// off too late to be of any use. For example the VC++ C4996 -// warning can be emitted from if that header is included -// before or by this one :-( -// - -#ifndef BOOST_CONFIG_WARNING_DISABLE_HPP -#define BOOST_CONFIG_WARNING_DISABLE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1400) - // Error 'function': was declared deprecated - // http://msdn2.microsoft.com/en-us/library/ttcz0bys(VS.80).aspx - // This error is emitted when you use some perfectly conforming - // std lib functions in a perfectly correct way, and also by - // some of Microsoft's own std lib code ! -# pragma warning(disable:4996) -#endif -#if defined(__INTEL_COMPILER) || defined(__ICL) - // As above: gives warning when a "deprecated" - // std library function is encountered. -# pragma warning(disable:1786) -#endif - -#endif // BOOST_CONFIG_WARNING_DISABLE_HPP diff --git a/native_client/boost_locale/boost/config/workaround.hpp b/native_client/boost_locale/boost/config/workaround.hpp deleted file mode 100644 index 0ce8108c2e..0000000000 --- a/native_client/boost_locale/boost/config/workaround.hpp +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright David Abrahams 2002. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -#ifndef BOOST_CONFIG_WORKAROUND_HPP -#define BOOST_CONFIG_WORKAROUND_HPP - -// Compiler/library version workaround macro -// -// Usage: -// -// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -// // workaround for eVC4 and VC6 -// ... // workaround code here -// #endif -// -// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the -// first argument must be undefined or expand to a numeric -// value. The above expands to: -// -// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300 -// -// When used for workarounds that apply to the latest known version -// and all earlier versions of a compiler, the following convention -// should be observed: -// -// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301)) -// -// The version number in this case corresponds to the last version in -// which the workaround was known to have been required. When -// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro -// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates -// the workaround for any version of the compiler. When -// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or -// error will be issued if the compiler version exceeds the argument -// to BOOST_TESTED_AT(). This can be used to locate workarounds which -// may be obsoleted by newer versions. - -#ifndef BOOST_STRICT_CONFIG - -#include - -#ifndef __BORLANDC__ -#define __BORLANDC___WORKAROUND_GUARD 1 -#else -#define __BORLANDC___WORKAROUND_GUARD 0 -#endif -#ifndef __CODEGEARC__ -#define __CODEGEARC___WORKAROUND_GUARD 1 -#else -#define __CODEGEARC___WORKAROUND_GUARD 0 -#endif -#ifndef _MSC_VER -#define _MSC_VER_WORKAROUND_GUARD 1 -#else -#define _MSC_VER_WORKAROUND_GUARD 0 -#endif -#ifndef _MSC_FULL_VER -#define _MSC_FULL_VER_WORKAROUND_GUARD 1 -#else -#define _MSC_FULL_VER_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_MSVC -#define BOOST_MSVC_WORKAROUND_GUARD 1 -#else -#define BOOST_MSVC_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_MSVC_FULL_VER -#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1 -#else -#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0 -#endif -#ifndef __GNUC__ -#define __GNUC___WORKAROUND_GUARD 1 -#else -#define __GNUC___WORKAROUND_GUARD 0 -#endif -#ifndef __GNUC_MINOR__ -#define __GNUC_MINOR___WORKAROUND_GUARD 1 -#else -#define __GNUC_MINOR___WORKAROUND_GUARD 0 -#endif -#ifndef __GNUC_PATCHLEVEL__ -#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1 -#else -#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_GCC -#define BOOST_GCC_WORKAROUND_GUARD 1 -#else -#define BOOST_GCC_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_XLCPP_ZOS -#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 1 -#else -#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 0 -#endif -#ifndef __IBMCPP__ -#define __IBMCPP___WORKAROUND_GUARD 1 -#else -#define __IBMCPP___WORKAROUND_GUARD 0 -#endif -#ifndef __SUNPRO_CC -#define __SUNPRO_CC_WORKAROUND_GUARD 1 -#else -#define __SUNPRO_CC_WORKAROUND_GUARD 0 -#endif -#ifndef __DECCXX_VER -#define __DECCXX_VER_WORKAROUND_GUARD 1 -#else -#define __DECCXX_VER_WORKAROUND_GUARD 0 -#endif -#ifndef __MWERKS__ -#define __MWERKS___WORKAROUND_GUARD 1 -#else -#define __MWERKS___WORKAROUND_GUARD 0 -#endif -#ifndef __EDG__ -#define __EDG___WORKAROUND_GUARD 1 -#else -#define __EDG___WORKAROUND_GUARD 0 -#endif -#ifndef __EDG_VERSION__ -#define __EDG_VERSION___WORKAROUND_GUARD 1 -#else -#define __EDG_VERSION___WORKAROUND_GUARD 0 -#endif -#ifndef __HP_aCC -#define __HP_aCC_WORKAROUND_GUARD 1 -#else -#define __HP_aCC_WORKAROUND_GUARD 0 -#endif -#ifndef __hpxstd98 -#define __hpxstd98_WORKAROUND_GUARD 1 -#else -#define __hpxstd98_WORKAROUND_GUARD 0 -#endif -#ifndef _CRAYC -#define _CRAYC_WORKAROUND_GUARD 1 -#else -#define _CRAYC_WORKAROUND_GUARD 0 -#endif -#ifndef __DMC__ -#define __DMC___WORKAROUND_GUARD 1 -#else -#define __DMC___WORKAROUND_GUARD 0 -#endif -#ifndef MPW_CPLUS -#define MPW_CPLUS_WORKAROUND_GUARD 1 -#else -#define MPW_CPLUS_WORKAROUND_GUARD 0 -#endif -#ifndef __COMO__ -#define __COMO___WORKAROUND_GUARD 1 -#else -#define __COMO___WORKAROUND_GUARD 0 -#endif -#ifndef __COMO_VERSION__ -#define __COMO_VERSION___WORKAROUND_GUARD 1 -#else -#define __COMO_VERSION___WORKAROUND_GUARD 0 -#endif -#ifndef __INTEL_COMPILER -#define __INTEL_COMPILER_WORKAROUND_GUARD 1 -#else -#define __INTEL_COMPILER_WORKAROUND_GUARD 0 -#endif -#ifndef __ICL -#define __ICL_WORKAROUND_GUARD 1 -#else -#define __ICL_WORKAROUND_GUARD 0 -#endif -#ifndef _COMPILER_VERSION -#define _COMPILER_VERSION_WORKAROUND_GUARD 1 -#else -#define _COMPILER_VERSION_WORKAROUND_GUARD 0 -#endif - -#ifndef _RWSTD_VER -#define _RWSTD_VER_WORKAROUND_GUARD 1 -#else -#define _RWSTD_VER_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_RWSTD_VER -#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1 -#else -#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0 -#endif -#ifndef __GLIBCPP__ -#define __GLIBCPP___WORKAROUND_GUARD 1 -#else -#define __GLIBCPP___WORKAROUND_GUARD 0 -#endif -#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC -#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1 -#else -#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0 -#endif -#ifndef __SGI_STL_PORT -#define __SGI_STL_PORT_WORKAROUND_GUARD 1 -#else -#define __SGI_STL_PORT_WORKAROUND_GUARD 0 -#endif -#ifndef _STLPORT_VERSION -#define _STLPORT_VERSION_WORKAROUND_GUARD 1 -#else -#define _STLPORT_VERSION_WORKAROUND_GUARD 0 -#endif -#ifndef __LIBCOMO_VERSION__ -#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1 -#else -#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0 -#endif -#ifndef _CPPLIB_VER -#define _CPPLIB_VER_WORKAROUND_GUARD 1 -#else -#define _CPPLIB_VER_WORKAROUND_GUARD 0 -#endif - -#ifndef BOOST_INTEL_CXX_VERSION -#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1 -#else -#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_INTEL_WIN -#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1 -#else -#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_DINKUMWARE_STDLIB -#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1 -#else -#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_INTEL -#define BOOST_INTEL_WORKAROUND_GUARD 1 -#else -#define BOOST_INTEL_WORKAROUND_GUARD 0 -#endif -// Always define to zero, if it's used it'll be defined my MPL: -#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0 - -#define BOOST_WORKAROUND(symbol, test) \ - ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \ - (symbol != 0) && (1 % (( (symbol test) ) + 1))) -// ^ ^ ^ ^ -// The extra level of parenthesis nesting above, along with the -// BOOST_OPEN_PAREN indirection below, is required to satisfy the -// broken preprocessor in MWCW 8.3 and earlier. -// -// The basic mechanism works as follows: -// (symbol test) + 1 => if (symbol test) then 2 else 1 -// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0 -// -// The complication with % is for cooperation with BOOST_TESTED_AT(). -// When "test" is BOOST_TESTED_AT(x) and -// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined, -// -// symbol test => if (symbol <= x) then 1 else -1 -// (symbol test) + 1 => if (symbol <= x) then 2 else 0 -// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero -// - -#ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS -# define BOOST_OPEN_PAREN ( -# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1 -#else -# define BOOST_TESTED_AT(value) != ((value)-(value)) -#endif - -#else - -#define BOOST_WORKAROUND(symbol, test) 0 - -#endif - -#endif // BOOST_CONFIG_WORKAROUND_HPP diff --git a/native_client/boost_locale/boost/cstdint.hpp b/native_client/boost_locale/boost/cstdint.hpp deleted file mode 100644 index 31b67417ae..0000000000 --- a/native_client/boost_locale/boost/cstdint.hpp +++ /dev/null @@ -1,560 +0,0 @@ -// boost cstdint.hpp header file ------------------------------------------// - -// (C) Copyright Beman Dawes 1999. -// (C) Copyright Jens Mauer 2001 -// (C) Copyright John Maddock 2001 -// Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/integer for documentation. - -// Revision History -// 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.) -// 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer) -// 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer) -// 12 Nov 00 Merged (Jens Maurer) -// 23 Sep 00 Added INTXX_C macro support (John Maddock). -// 22 Sep 00 Better 64-bit support (John Maddock) -// 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost -// 8 Aug 99 Initial version (Beman Dawes) - - -#ifndef BOOST_CSTDINT_HPP -#define BOOST_CSTDINT_HPP - -// -// Since we always define the INT#_C macros as per C++0x, -// define __STDC_CONSTANT_MACROS so that does the right -// thing if possible, and so that the user knows that the macros -// are actually defined as per C99. -// -#ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS -#endif - -#include - -// -// Note that GLIBC is a bit inconsistent about whether int64_t is defined or not -// depending upon what headers happen to have been included first... -// so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. -// See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 -// -#if defined(BOOST_HAS_STDINT_H) \ - && (!defined(__GLIBC__) \ - || defined(__GLIBC_HAVE_LONG_LONG) \ - || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17))))) - -// The following #include is an implementation artifact; not part of interface. -# ifdef __hpux -// HP-UX has a vaguely nice in a non-standard location -# include -# ifdef __STDC_32_MODE__ - // this is triggered with GCC, because it defines __cplusplus < 199707L -# define BOOST_NO_INT64_T -# endif -# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX) -# include -# else -# include - -// There is a bug in Cygwin two _C macros -# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__) -# undef INTMAX_C -# undef UINTMAX_C -# define INTMAX_C(c) c##LL -# define UINTMAX_C(c) c##ULL -# endif - -# endif - -#if defined(__QNX__) && defined(__EXT_QNX) - -// QNX (Dinkumware stdlib) defines these as non-standard names. -// Reflect to the standard names. - -typedef ::intleast8_t int_least8_t; -typedef ::intfast8_t int_fast8_t; -typedef ::uintleast8_t uint_least8_t; -typedef ::uintfast8_t uint_fast8_t; - -typedef ::intleast16_t int_least16_t; -typedef ::intfast16_t int_fast16_t; -typedef ::uintleast16_t uint_least16_t; -typedef ::uintfast16_t uint_fast16_t; - -typedef ::intleast32_t int_least32_t; -typedef ::intfast32_t int_fast32_t; -typedef ::uintleast32_t uint_least32_t; -typedef ::uintfast32_t uint_fast32_t; - -# ifndef BOOST_NO_INT64_T - -typedef ::intleast64_t int_least64_t; -typedef ::intfast64_t int_fast64_t; -typedef ::uintleast64_t uint_least64_t; -typedef ::uintfast64_t uint_fast64_t; - -# endif - -#endif - -namespace boost -{ - - using ::int8_t; - using ::int_least8_t; - using ::int_fast8_t; - using ::uint8_t; - using ::uint_least8_t; - using ::uint_fast8_t; - - using ::int16_t; - using ::int_least16_t; - using ::int_fast16_t; - using ::uint16_t; - using ::uint_least16_t; - using ::uint_fast16_t; - - using ::int32_t; - using ::int_least32_t; - using ::int_fast32_t; - using ::uint32_t; - using ::uint_least32_t; - using ::uint_fast32_t; - -# ifndef BOOST_NO_INT64_T - - using ::int64_t; - using ::int_least64_t; - using ::int_fast64_t; - using ::uint64_t; - using ::uint_least64_t; - using ::uint_fast64_t; - -# endif - - using ::intmax_t; - using ::uintmax_t; - -} // namespace boost - -#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) || defined(__SOLARIS9__) || defined(__NetBSD__) -// FreeBSD and Tru64 have an that contains much of what we need. -# include - -namespace boost { - - using ::int8_t; - typedef int8_t int_least8_t; - typedef int8_t int_fast8_t; - using ::uint8_t; - typedef uint8_t uint_least8_t; - typedef uint8_t uint_fast8_t; - - using ::int16_t; - typedef int16_t int_least16_t; - typedef int16_t int_fast16_t; - using ::uint16_t; - typedef uint16_t uint_least16_t; - typedef uint16_t uint_fast16_t; - - using ::int32_t; - typedef int32_t int_least32_t; - typedef int32_t int_fast32_t; - using ::uint32_t; - typedef uint32_t uint_least32_t; - typedef uint32_t uint_fast32_t; - -# ifndef BOOST_NO_INT64_T - - using ::int64_t; - typedef int64_t int_least64_t; - typedef int64_t int_fast64_t; - using ::uint64_t; - typedef uint64_t uint_least64_t; - typedef uint64_t uint_fast64_t; - - typedef int64_t intmax_t; - typedef uint64_t uintmax_t; - -# else - - typedef int32_t intmax_t; - typedef uint32_t uintmax_t; - -# endif - -} // namespace boost - -#else // BOOST_HAS_STDINT_H - -# include // implementation artifact; not part of interface -# include // needed for limits macros - - -namespace boost -{ - -// These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit -// platforms. For other systems, they will have to be hand tailored. -// -// Because the fast types are assumed to be the same as the undecorated types, -// it may be possible to hand tailor a more efficient implementation. Such -// an optimization may be illusionary; on the Intel x86-family 386 on, for -// example, byte arithmetic and load/stores are as fast as "int" sized ones. - -// 8-bit types ------------------------------------------------------------// - -# if UCHAR_MAX == 0xff - typedef signed char int8_t; - typedef signed char int_least8_t; - typedef signed char int_fast8_t; - typedef unsigned char uint8_t; - typedef unsigned char uint_least8_t; - typedef unsigned char uint_fast8_t; -# else -# error defaults not correct; you must hand modify boost/cstdint.hpp -# endif - -// 16-bit types -----------------------------------------------------------// - -# if USHRT_MAX == 0xffff -# if defined(__crayx1) - // The Cray X1 has a 16-bit short, however it is not recommend - // for use in performance critical code. - typedef short int16_t; - typedef short int_least16_t; - typedef int int_fast16_t; - typedef unsigned short uint16_t; - typedef unsigned short uint_least16_t; - typedef unsigned int uint_fast16_t; -# else - typedef short int16_t; - typedef short int_least16_t; - typedef short int_fast16_t; - typedef unsigned short uint16_t; - typedef unsigned short uint_least16_t; - typedef unsigned short uint_fast16_t; -# endif -# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) - // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified - // MTA / XMT does support the following non-standard integer types - typedef __short16 int16_t; - typedef __short16 int_least16_t; - typedef __short16 int_fast16_t; - typedef unsigned __short16 uint16_t; - typedef unsigned __short16 uint_least16_t; - typedef unsigned __short16 uint_fast16_t; -# elif (USHRT_MAX == 0xffffffff) && defined(CRAY) - // no 16-bit types on Cray: - typedef short int_least16_t; - typedef short int_fast16_t; - typedef unsigned short uint_least16_t; - typedef unsigned short uint_fast16_t; -# else -# error defaults not correct; you must hand modify boost/cstdint.hpp -# endif - -// 32-bit types -----------------------------------------------------------// - -# if UINT_MAX == 0xffffffff - typedef int int32_t; - typedef int int_least32_t; - typedef int int_fast32_t; - typedef unsigned int uint32_t; - typedef unsigned int uint_least32_t; - typedef unsigned int uint_fast32_t; -# elif (USHRT_MAX == 0xffffffff) - typedef short int32_t; - typedef short int_least32_t; - typedef short int_fast32_t; - typedef unsigned short uint32_t; - typedef unsigned short uint_least32_t; - typedef unsigned short uint_fast32_t; -# elif ULONG_MAX == 0xffffffff - typedef long int32_t; - typedef long int_least32_t; - typedef long int_fast32_t; - typedef unsigned long uint32_t; - typedef unsigned long uint_least32_t; - typedef unsigned long uint_fast32_t; -# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) - // Integers are 64 bits on the MTA / XMT - typedef __int32 int32_t; - typedef __int32 int_least32_t; - typedef __int32 int_fast32_t; - typedef unsigned __int32 uint32_t; - typedef unsigned __int32 uint_least32_t; - typedef unsigned __int32 uint_fast32_t; -# else -# error defaults not correct; you must hand modify boost/cstdint.hpp -# endif - -// 64-bit types + intmax_t and uintmax_t ----------------------------------// - -# if defined(BOOST_HAS_LONG_LONG) && \ - !defined(BOOST_MSVC) && !defined(__BORLANDC__) && \ - (!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \ - (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) -# if defined(__hpux) - // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions -# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) - // 2**64 - 1 -# else -# error defaults not correct; you must hand modify boost/cstdint.hpp -# endif - - typedef ::boost::long_long_type intmax_t; - typedef ::boost::ulong_long_type uintmax_t; - typedef ::boost::long_long_type int64_t; - typedef ::boost::long_long_type int_least64_t; - typedef ::boost::long_long_type int_fast64_t; - typedef ::boost::ulong_long_type uint64_t; - typedef ::boost::ulong_long_type uint_least64_t; - typedef ::boost::ulong_long_type uint_fast64_t; - -# elif ULONG_MAX != 0xffffffff - -# if ULONG_MAX == 18446744073709551615 // 2**64 - 1 - typedef long intmax_t; - typedef unsigned long uintmax_t; - typedef long int64_t; - typedef long int_least64_t; - typedef long int_fast64_t; - typedef unsigned long uint64_t; - typedef unsigned long uint_least64_t; - typedef unsigned long uint_fast64_t; -# else -# error defaults not correct; you must hand modify boost/cstdint.hpp -# endif -# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG) - __extension__ typedef long long intmax_t; - __extension__ typedef unsigned long long uintmax_t; - __extension__ typedef long long int64_t; - __extension__ typedef long long int_least64_t; - __extension__ typedef long long int_fast64_t; - __extension__ typedef unsigned long long uint64_t; - __extension__ typedef unsigned long long uint_least64_t; - __extension__ typedef unsigned long long uint_fast64_t; -# elif defined(BOOST_HAS_MS_INT64) - // - // we have Borland/Intel/Microsoft __int64: - // - typedef __int64 intmax_t; - typedef unsigned __int64 uintmax_t; - typedef __int64 int64_t; - typedef __int64 int_least64_t; - typedef __int64 int_fast64_t; - typedef unsigned __int64 uint64_t; - typedef unsigned __int64 uint_least64_t; - typedef unsigned __int64 uint_fast64_t; -# else // assume no 64-bit integers -# define BOOST_NO_INT64_T - typedef int32_t intmax_t; - typedef uint32_t uintmax_t; -# endif - -} // namespace boost - - -#endif // BOOST_HAS_STDINT_H - -// intptr_t/uintptr_t are defined separately because they are optional and not universally available -#if defined(BOOST_WINDOWS) && !defined(_WIN32_WCE) && !defined(BOOST_HAS_STDINT_H) -// Older MSVC don't have stdint.h and have intptr_t/uintptr_t defined in stddef.h -#include -#endif - -// PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config. -#if !defined(__PGIC__) - -#if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \ - || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \ - || defined(__CYGWIN__) \ - || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ - || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || (defined(sun) && !defined(BOOST_HAS_STDINT_H)) || defined(INTPTR_MAX) - -namespace boost { - using ::intptr_t; - using ::uintptr_t; -} -#define BOOST_HAS_INTPTR_T - -// Clang pretends to be GCC, so it'll match this condition -#elif defined(__GNUC__) && defined(__INTPTR_TYPE__) && defined(__UINTPTR_TYPE__) - -namespace boost { - typedef __INTPTR_TYPE__ intptr_t; - typedef __UINTPTR_TYPE__ uintptr_t; -} -#define BOOST_HAS_INTPTR_T - -#endif - -#endif // !defined(__PGIC__) - -#endif // BOOST_CSTDINT_HPP - - -/**************************************************** - -Macro definition section: - -Added 23rd September 2000 (John Maddock). -Modified 11th September 2001 to be excluded when -BOOST_HAS_STDINT_H is defined (John Maddock). -Modified 11th Dec 2009 to always define the -INT#_C macros if they're not already defined (John Maddock). - -******************************************************/ - -#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \ - (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C)) -// -// For the following code we get several warnings along the lines of: -// -// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant -// -// So we declare this a system header to suppress these warnings. -// -#if defined(__GNUC__) && (__GNUC__ >= 4) -#pragma GCC system_header -#endif -// -// Undef the macros as a precaution, since we may get here if has failed -// to define them all, see https://svn.boost.org/trac/boost/ticket/12786 -// -#undef INT8_C -#undef INT16_C -#undef INT32_C -#undef INT64_C -#undef INTMAX_C -#undef UINT8_C -#undef UINT16_C -#undef UINT32_C -#undef UINT64_C -#undef UINTMAX_C - -#include -# define BOOST__STDC_CONSTANT_MACROS_DEFINED -# if defined(BOOST_HAS_MS_INT64) -// -// Borland/Intel/Microsoft compilers have width specific suffixes: -// -#ifndef INT8_C -# define INT8_C(value) value##i8 -#endif -#ifndef INT16_C -# define INT16_C(value) value##i16 -#endif -#ifndef INT32_C -# define INT32_C(value) value##i32 -#endif -#ifndef INT64_C -# define INT64_C(value) value##i64 -#endif -# ifdef __BORLANDC__ - // Borland bug: appending ui8 makes the type a signed char -# define UINT8_C(value) static_cast(value##u) -# else -# define UINT8_C(value) value##ui8 -# endif -#ifndef UINT16_C -# define UINT16_C(value) value##ui16 -#endif -#ifndef UINT32_C -# define UINT32_C(value) value##ui32 -#endif -#ifndef UINT64_C -# define UINT64_C(value) value##ui64 -#endif -#ifndef INTMAX_C -# define INTMAX_C(value) value##i64 -# define UINTMAX_C(value) value##ui64 -#endif - -# else -// do it the old fashioned way: - -// 8-bit types ------------------------------------------------------------// - -# if (UCHAR_MAX == 0xff) && !defined(INT8_C) -# define INT8_C(value) static_cast(value) -# define UINT8_C(value) static_cast(value##u) -# endif - -// 16-bit types -----------------------------------------------------------// - -# if (USHRT_MAX == 0xffff) && !defined(INT16_C) -# define INT16_C(value) static_cast(value) -# define UINT16_C(value) static_cast(value##u) -# endif - -// 32-bit types -----------------------------------------------------------// -#ifndef INT32_C -# if (UINT_MAX == 0xffffffff) -# define INT32_C(value) value -# define UINT32_C(value) value##u -# elif ULONG_MAX == 0xffffffff -# define INT32_C(value) value##L -# define UINT32_C(value) value##uL -# endif -#endif - -// 64-bit types + intmax_t and uintmax_t ----------------------------------// -#ifndef INT64_C -# if defined(BOOST_HAS_LONG_LONG) && \ - (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_ULLONG_MAX) || defined(_LLONG_MAX)) - -# if defined(__hpux) - // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions -# define INT64_C(value) value##LL -# define UINT64_C(value) value##uLL -# elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || \ - (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || \ - (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \ - (defined(_ULLONG_MAX) && _ULLONG_MAX == 18446744073709551615ULL) || \ - (defined(_LLONG_MAX) && _LLONG_MAX == 9223372036854775807LL) - -# define INT64_C(value) value##LL -# define UINT64_C(value) value##uLL -# else -# error defaults not correct; you must hand modify boost/cstdint.hpp -# endif -# elif ULONG_MAX != 0xffffffff - -# if ULONG_MAX == 18446744073709551615U // 2**64 - 1 -# define INT64_C(value) value##L -# define UINT64_C(value) value##uL -# else -# error defaults not correct; you must hand modify boost/cstdint.hpp -# endif -# elif defined(BOOST_HAS_LONG_LONG) - // Usual macros not defined, work things out for ourselves: -# if(~0uLL == 18446744073709551615ULL) -# define INT64_C(value) value##LL -# define UINT64_C(value) value##uLL -# else -# error defaults not correct; you must hand modify boost/cstdint.hpp -# endif -# else -# error defaults not correct; you must hand modify boost/cstdint.hpp -# endif - -# ifdef BOOST_NO_INT64_T -# define INTMAX_C(value) INT32_C(value) -# define UINTMAX_C(value) UINT32_C(value) -# else -# define INTMAX_C(value) INT64_C(value) -# define UINTMAX_C(value) UINT64_C(value) -# endif -#endif -# endif // Borland/Microsoft specific width suffixes - -#endif // INT#_C macros. - - - - diff --git a/native_client/boost_locale/boost/limits.hpp b/native_client/boost_locale/boost/limits.hpp deleted file mode 100644 index 47d8155611..0000000000 --- a/native_client/boost_locale/boost/limits.hpp +++ /dev/null @@ -1,146 +0,0 @@ - -// (C) Copyright John maddock 1999. -// (C) David Abrahams 2002. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// use this header as a workaround for missing - -// See http://www.boost.org/libs/compatibility/index.html for documentation. - -#ifndef BOOST_LIMITS -#define BOOST_LIMITS - -#include - -#ifdef BOOST_NO_LIMITS -# error "There is no std::numeric_limits suppport available." -#else -# include -#endif - -#if (defined(BOOST_HAS_LONG_LONG) && defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)) \ - || (defined(BOOST_HAS_MS_INT64) && defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)) -// Add missing specializations for numeric_limits: -#ifdef BOOST_HAS_MS_INT64 -# define BOOST_LLT __int64 -# define BOOST_ULLT unsigned __int64 -#else -# define BOOST_LLT ::boost::long_long_type -# define BOOST_ULLT ::boost::ulong_long_type -#endif - -#include // for CHAR_BIT - -namespace std -{ - template<> - class numeric_limits - { - public: - - BOOST_STATIC_CONSTANT(bool, is_specialized = true); -#ifdef BOOST_HAS_MS_INT64 - static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x8000000000000000i64; } - static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x7FFFFFFFFFFFFFFFi64; } -#elif defined(LLONG_MAX) - static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MIN; } - static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MAX; } -#elif defined(LONGLONG_MAX) - static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MIN; } - static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MAX; } -#else - static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 1LL << (sizeof(BOOST_LLT) * CHAR_BIT - 1); } - static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~(min)(); } -#endif - BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT -1); - BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT) - 1) * 301L / 1000); - BOOST_STATIC_CONSTANT(bool, is_signed = true); - BOOST_STATIC_CONSTANT(bool, is_integer = true); - BOOST_STATIC_CONSTANT(bool, is_exact = true); - BOOST_STATIC_CONSTANT(int, radix = 2); - static BOOST_LLT epsilon() throw() { return 0; }; - static BOOST_LLT round_error() throw() { return 0; }; - - BOOST_STATIC_CONSTANT(int, min_exponent = 0); - BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); - BOOST_STATIC_CONSTANT(int, max_exponent = 0); - BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); - - BOOST_STATIC_CONSTANT(bool, has_infinity = false); - BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); - BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); - BOOST_STATIC_CONSTANT(bool, has_denorm = false); - BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); - static BOOST_LLT infinity() throw() { return 0; }; - static BOOST_LLT quiet_NaN() throw() { return 0; }; - static BOOST_LLT signaling_NaN() throw() { return 0; }; - static BOOST_LLT denorm_min() throw() { return 0; }; - - BOOST_STATIC_CONSTANT(bool, is_iec559 = false); - BOOST_STATIC_CONSTANT(bool, is_bounded = true); - BOOST_STATIC_CONSTANT(bool, is_modulo = true); - - BOOST_STATIC_CONSTANT(bool, traps = false); - BOOST_STATIC_CONSTANT(bool, tinyness_before = false); - BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); - - }; - - template<> - class numeric_limits - { - public: - - BOOST_STATIC_CONSTANT(bool, is_specialized = true); -#ifdef BOOST_HAS_MS_INT64 - static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0ui64; } - static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0xFFFFFFFFFFFFFFFFui64; } -#elif defined(ULLONG_MAX) && defined(ULLONG_MIN) - static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MIN; } - static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MAX; } -#elif defined(ULONGLONG_MAX) && defined(ULONGLONG_MIN) - static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MIN; } - static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MAX; } -#else - static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0uLL; } - static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~0uLL; } -#endif - BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT); - BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT)) * 301L / 1000); - BOOST_STATIC_CONSTANT(bool, is_signed = false); - BOOST_STATIC_CONSTANT(bool, is_integer = true); - BOOST_STATIC_CONSTANT(bool, is_exact = true); - BOOST_STATIC_CONSTANT(int, radix = 2); - static BOOST_ULLT epsilon() throw() { return 0; }; - static BOOST_ULLT round_error() throw() { return 0; }; - - BOOST_STATIC_CONSTANT(int, min_exponent = 0); - BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); - BOOST_STATIC_CONSTANT(int, max_exponent = 0); - BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); - - BOOST_STATIC_CONSTANT(bool, has_infinity = false); - BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); - BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); - BOOST_STATIC_CONSTANT(bool, has_denorm = false); - BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); - static BOOST_ULLT infinity() throw() { return 0; }; - static BOOST_ULLT quiet_NaN() throw() { return 0; }; - static BOOST_ULLT signaling_NaN() throw() { return 0; }; - static BOOST_ULLT denorm_min() throw() { return 0; }; - - BOOST_STATIC_CONSTANT(bool, is_iec559 = false); - BOOST_STATIC_CONSTANT(bool, is_bounded = true); - BOOST_STATIC_CONSTANT(bool, is_modulo = true); - - BOOST_STATIC_CONSTANT(bool, traps = false); - BOOST_STATIC_CONSTANT(bool, tinyness_before = false); - BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); - - }; -} -#endif - -#endif - diff --git a/native_client/boost_locale/boost/locale/definitions.hpp b/native_client/boost_locale/boost/locale/definitions.hpp deleted file mode 100644 index b305ff730b..0000000000 --- a/native_client/boost_locale/boost/locale/definitions.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -#ifndef BOOST_LOCALE_DEFINITIONS_HPP_INCLUDED -#define BOOST_LOCALE_DEFINITIONS_HPP_INCLUDED - -#include - -// Support older ICU versions -#ifndef BOOST_SYMBOL_VISIBLE -# define BOOST_SYMBOL_VISIBLE -#endif - -#ifdef BOOST_HAS_DECLSPEC -# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_LOCALE_DYN_LINK) -# ifdef BOOST_LOCALE_SOURCE -# define BOOST_LOCALE_DECL BOOST_SYMBOL_EXPORT -# else -# define BOOST_LOCALE_DECL BOOST_SYMBOL_IMPORT -# endif // BOOST_LOCALE_SOURCE -# endif // DYN_LINK -#endif // BOOST_HAS_DECLSPEC - -#ifndef BOOST_LOCALE_DECL -# define BOOST_LOCALE_DECL -#endif - -#endif // boost/locale/config.hpp -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 - diff --git a/native_client/boost_locale/boost/locale/encoding_errors.hpp b/native_client/boost_locale/boost/locale/encoding_errors.hpp deleted file mode 100644 index 42b4bdf4b6..0000000000 --- a/native_client/boost_locale/boost/locale/encoding_errors.hpp +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -#ifndef BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED -#define BOOST_LOCALE_ENCODING_ERRORS_HPP_INCLUDED - -#include -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4275 4251 4231 4660) -#endif -#include - - - -namespace boost { - namespace locale { - namespace conv { - /// - /// \addtogroup codepage - /// - /// @{ - - /// - /// \brief The excepton that is thrown in case of conversion error - /// - class BOOST_SYMBOL_VISIBLE conversion_error : public std::runtime_error { - public: - conversion_error() : std::runtime_error("Conversion failed") {} - }; - - /// - /// \brief This exception is thrown in case of use of unsupported - /// or invalid character set - /// - class BOOST_SYMBOL_VISIBLE invalid_charset_error : public std::runtime_error { - public: - - /// Create an error for charset \a charset - invalid_charset_error(std::string charset) : - std::runtime_error("Invalid or unsupported charset:" + charset) - { - } - }; - - - /// - /// enum that defines conversion policy - /// - typedef enum { - skip = 0, ///< Skip illegal/unconvertable characters - stop = 1, ///< Stop conversion and throw conversion_error - default_method = skip ///< Default method - skip - } method_type; - - - /// @} - - } // conv - - } // locale -} // boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif - -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 - diff --git a/native_client/boost_locale/boost/locale/encoding_utf.hpp b/native_client/boost_locale/boost/locale/encoding_utf.hpp deleted file mode 100644 index 9620a2f4b9..0000000000 --- a/native_client/boost_locale/boost/locale/encoding_utf.hpp +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -#ifndef BOOST_LOCALE_ENCODING_UTF_HPP_INCLUDED -#define BOOST_LOCALE_ENCODING_UTF_HPP_INCLUDED - -#include -#include -#include -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4275 4251 4231 4660) -#endif - - - -namespace boost { - namespace locale { - namespace conv { - /// - /// \addtogroup codepage - /// - /// @{ - - /// - /// Convert a Unicode text in range [begin,end) to other Unicode encoding - /// - template - std::basic_string - utf_to_utf(CharIn const *begin,CharIn const *end,method_type how = default_method) - { - std::basic_string result; - result.reserve(end-begin); - typedef std::back_insert_iterator > inserter_type; - inserter_type inserter(result); - utf::code_point c; - while(begin!=end) { - c=utf::utf_traits::template decode(begin,end); - if(c==utf::illegal || c==utf::incomplete) { - if(how==stop) - throw conversion_error(); - } - else { - utf::utf_traits::template encode(c,inserter); - } - } - return result; - } - - /// - /// Convert a Unicode NUL terminated string \a str other Unicode encoding - /// - template - std::basic_string - utf_to_utf(CharIn const *str,method_type how = default_method) - { - CharIn const *end = str; - while(*end) - end++; - return utf_to_utf(str,end,how); - } - - - /// - /// Convert a Unicode string \a str other Unicode encoding - /// - template - std::basic_string - utf_to_utf(std::basic_string const &str,method_type how = default_method) - { - return utf_to_utf(str.c_str(),str.c_str()+str.size(),how); - } - - - /// @} - - } // conv - - } // locale -} // boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif - -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 - diff --git a/native_client/boost_locale/boost/locale/utf.hpp b/native_client/boost_locale/boost/locale/utf.hpp deleted file mode 100644 index 09f4449ef9..0000000000 --- a/native_client/boost_locale/boost/locale/utf.hpp +++ /dev/null @@ -1,460 +0,0 @@ -// -// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh) -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -#ifndef BOOST_LOCALE_UTF_HPP_INCLUDED -#define BOOST_LOCALE_UTF_HPP_INCLUDED - -#include - -namespace boost { -namespace locale { -/// -/// \brief Namespace that holds basic operations on UTF encoded sequences -/// -/// All functions defined in this namespace do not require linking with Boost.Locale library -/// -namespace utf { - /// \cond INTERNAL - #ifdef __GNUC__ - # define BOOST_LOCALE_LIKELY(x) __builtin_expect((x),1) - # define BOOST_LOCALE_UNLIKELY(x) __builtin_expect((x),0) - #else - # define BOOST_LOCALE_LIKELY(x) (x) - # define BOOST_LOCALE_UNLIKELY(x) (x) - #endif - /// \endcond - - /// - /// \brief The integral type that can hold a Unicode code point - /// - typedef uint32_t code_point; - - /// - /// \brief Special constant that defines illegal code point - /// - static const code_point illegal = 0xFFFFFFFFu; - - /// - /// \brief Special constant that defines incomplete code point - /// - static const code_point incomplete = 0xFFFFFFFEu; - - /// - /// \brief the function checks if \a v is a valid code point - /// - inline bool is_valid_codepoint(code_point v) - { - if(v>0x10FFFF) - return false; - if(0xD800 <=v && v<= 0xDFFF) // surragates - return false; - return true; - } - - #ifdef BOOST_LOCALE_DOXYGEN - /// - /// \brief UTF Traits class - functions to convert UTF sequences to and from Unicode code points - /// - template - struct utf_traits { - /// - /// The type of the character - /// - typedef CharType char_type; - /// - /// Read one code point from the range [p,e) and return it. - /// - /// - If the sequence that was read is incomplete sequence returns \ref incomplete, - /// - If illegal sequence detected returns \ref illegal - /// - /// Requirements - /// - /// - Iterator is valid input iterator - /// - /// Postconditions - /// - /// - p points to the last consumed character - /// - template - static code_point decode(Iterator &p,Iterator e); - - /// - /// Maximal width of valid sequence in the code units: - /// - /// - UTF-8 - 4 - /// - UTF-16 - 2 - /// - UTF-32 - 1 - /// - static const int max_width; - /// - /// The width of specific code point in the code units. - /// - /// Requirement: value is a valid Unicode code point - /// Returns value in range [1..max_width] - /// - static int width(code_point value); - - /// - /// Get the size of the trail part of variable length encoded sequence. - /// - /// Returns -1 if C is not valid lead character - /// - static int trail_length(char_type c); - /// - /// Returns true if c is trail code unit, always false for UTF-32 - /// - static bool is_trail(char_type c); - /// - /// Returns true if c is lead code unit, always true of UTF-32 - /// - static bool is_lead(char_type c); - - /// - /// Convert valid Unicode code point \a value to the UTF sequence. - /// - /// Requirements: - /// - /// - \a value is valid code point - /// - \a out is an output iterator should be able to accept at least width(value) units - /// - /// Returns the iterator past the last written code unit. - /// - template - static Iterator encode(code_point value,Iterator out); - /// - /// Decodes valid UTF sequence that is pointed by p into code point. - /// - /// If the sequence is invalid or points to end the behavior is undefined - /// - template - static code_point decode_valid(Iterator &p); - }; - - #else - - template - struct utf_traits; - - template - struct utf_traits { - - typedef CharType char_type; - - static int trail_length(char_type ci) - { - unsigned char c = ci; - if(c < 128) - return 0; - if(BOOST_LOCALE_UNLIKELY(c < 194)) - return -1; - if(c < 224) - return 1; - if(c < 240) - return 2; - if(BOOST_LOCALE_LIKELY(c <=244)) - return 3; - return -1; - } - - static const int max_width = 4; - - static int width(code_point value) - { - if(value <=0x7F) { - return 1; - } - else if(value <=0x7FF) { - return 2; - } - else if(BOOST_LOCALE_LIKELY(value <=0xFFFF)) { - return 3; - } - else { - return 4; - } - } - - static bool is_trail(char_type ci) - { - unsigned char c=ci; - return (c & 0xC0)==0x80; - } - - static bool is_lead(char_type ci) - { - return !is_trail(ci); - } - - template - static code_point decode(Iterator &p,Iterator e) - { - if(BOOST_LOCALE_UNLIKELY(p==e)) - return incomplete; - - unsigned char lead = *p++; - - // First byte is fully validated here - int trail_size = trail_length(lead); - - if(BOOST_LOCALE_UNLIKELY(trail_size < 0)) - return illegal; - - // - // Ok as only ASCII may be of size = 0 - // also optimize for ASCII text - // - if(trail_size == 0) - return lead; - - code_point c = lead & ((1<<(6-trail_size))-1); - - // Read the rest - unsigned char tmp; - switch(trail_size) { - case 3: - if(BOOST_LOCALE_UNLIKELY(p==e)) - return incomplete; - tmp = *p++; - if (!is_trail(tmp)) - return illegal; - c = (c << 6) | ( tmp & 0x3F); - case 2: - if(BOOST_LOCALE_UNLIKELY(p==e)) - return incomplete; - tmp = *p++; - if (!is_trail(tmp)) - return illegal; - c = (c << 6) | ( tmp & 0x3F); - case 1: - if(BOOST_LOCALE_UNLIKELY(p==e)) - return incomplete; - tmp = *p++; - if (!is_trail(tmp)) - return illegal; - c = (c << 6) | ( tmp & 0x3F); - } - - // Check code point validity: no surrogates and - // valid range - if(BOOST_LOCALE_UNLIKELY(!is_valid_codepoint(c))) - return illegal; - - // make sure it is the most compact representation - if(BOOST_LOCALE_UNLIKELY(width(c)!=trail_size + 1)) - return illegal; - - return c; - - } - - template - static code_point decode_valid(Iterator &p) - { - unsigned char lead = *p++; - if(lead < 192) - return lead; - - int trail_size; - - if(lead < 224) - trail_size = 1; - else if(BOOST_LOCALE_LIKELY(lead < 240)) // non-BMP rare - trail_size = 2; - else - trail_size = 3; - - code_point c = lead & ((1<<(6-trail_size))-1); - - switch(trail_size) { - case 3: - c = (c << 6) | ( static_cast(*p++) & 0x3F); - case 2: - c = (c << 6) | ( static_cast(*p++) & 0x3F); - case 1: - c = (c << 6) | ( static_cast(*p++) & 0x3F); - } - - return c; - } - - - - template - static Iterator encode(code_point value,Iterator out) - { - if(value <= 0x7F) { - *out++ = static_cast(value); - } - else if(value <= 0x7FF) { - *out++ = static_cast((value >> 6) | 0xC0); - *out++ = static_cast((value & 0x3F) | 0x80); - } - else if(BOOST_LOCALE_LIKELY(value <= 0xFFFF)) { - *out++ = static_cast((value >> 12) | 0xE0); - *out++ = static_cast(((value >> 6) & 0x3F) | 0x80); - *out++ = static_cast((value & 0x3F) | 0x80); - } - else { - *out++ = static_cast((value >> 18) | 0xF0); - *out++ = static_cast(((value >> 12) & 0x3F) | 0x80); - *out++ = static_cast(((value >> 6) & 0x3F) | 0x80); - *out++ = static_cast((value & 0x3F) | 0x80); - } - return out; - } - }; // utf8 - - template - struct utf_traits { - typedef CharType char_type; - - // See RFC 2781 - static bool is_first_surrogate(uint16_t x) - { - return 0xD800 <=x && x<= 0xDBFF; - } - static bool is_second_surrogate(uint16_t x) - { - return 0xDC00 <=x && x<= 0xDFFF; - } - static code_point combine_surrogate(uint16_t w1,uint16_t w2) - { - return ((code_point(w1 & 0x3FF) << 10) | (w2 & 0x3FF)) + 0x10000; - } - static int trail_length(char_type c) - { - if(is_first_surrogate(c)) - return 1; - if(is_second_surrogate(c)) - return -1; - return 0; - } - /// - /// Returns true if c is trail code unit, always false for UTF-32 - /// - static bool is_trail(char_type c) - { - return is_second_surrogate(c); - } - /// - /// Returns true if c is lead code unit, always true of UTF-32 - /// - static bool is_lead(char_type c) - { - return !is_second_surrogate(c); - } - - template - static code_point decode(It ¤t,It last) - { - if(BOOST_LOCALE_UNLIKELY(current == last)) - return incomplete; - uint16_t w1=*current++; - if(BOOST_LOCALE_LIKELY(w1 < 0xD800 || 0xDFFF < w1)) { - return w1; - } - if(w1 > 0xDBFF) - return illegal; - if(current==last) - return incomplete; - uint16_t w2=*current++; - if(w2 < 0xDC00 || 0xDFFF < w2) - return illegal; - return combine_surrogate(w1,w2); - } - template - static code_point decode_valid(It ¤t) - { - uint16_t w1=*current++; - if(BOOST_LOCALE_LIKELY(w1 < 0xD800 || 0xDFFF < w1)) { - return w1; - } - uint16_t w2=*current++; - return combine_surrogate(w1,w2); - } - - static const int max_width = 2; - static int width(code_point u) - { - return u>=0x10000 ? 2 : 1; - } - template - static It encode(code_point u,It out) - { - if(BOOST_LOCALE_LIKELY(u<=0xFFFF)) { - *out++ = static_cast(u); - } - else { - u -= 0x10000; - *out++ = static_cast(0xD800 | (u>>10)); - *out++ = static_cast(0xDC00 | (u & 0x3FF)); - } - return out; - } - }; // utf16; - - - template - struct utf_traits { - typedef CharType char_type; - static int trail_length(char_type c) - { - if(is_valid_codepoint(c)) - return 0; - return -1; - } - static bool is_trail(char_type /*c*/) - { - return false; - } - static bool is_lead(char_type /*c*/) - { - return true; - } - - template - static code_point decode_valid(It ¤t) - { - return *current++; - } - - template - static code_point decode(It ¤t,It last) - { - if(BOOST_LOCALE_UNLIKELY(current == last)) - return boost::locale::utf::incomplete; - code_point c=*current++; - if(BOOST_LOCALE_UNLIKELY(!is_valid_codepoint(c))) - return boost::locale::utf::illegal; - return c; - } - static const int max_width = 1; - static int width(code_point /*u*/) - { - return 1; - } - template - static It encode(code_point u,It out) - { - *out++ = static_cast(u); - return out; - } - - }; // utf32 - - #endif - - -} // utf -} // locale -} // boost - - -#endif - -// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 - diff --git a/native_client/boost_locale/boost/version.hpp b/native_client/boost_locale/boost/version.hpp deleted file mode 100644 index 53de342e96..0000000000 --- a/native_client/boost_locale/boost/version.hpp +++ /dev/null @@ -1,32 +0,0 @@ -// Boost version.hpp configuration header file ------------------------------// - -// (C) Copyright John maddock 1999. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/config for documentation - -#ifndef BOOST_VERSION_HPP -#define BOOST_VERSION_HPP - -// -// Caution: this is the only Boost header that is guaranteed -// to change with every Boost release. Including this header -// will cause a recompile every time a new Boost version is -// used. -// -// BOOST_VERSION % 100 is the patch level -// BOOST_VERSION / 100 % 1000 is the minor version -// BOOST_VERSION / 100000 is the major version - -#define BOOST_VERSION 106501 - -// -// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION -// but as a *string* in the form "x_y[_z]" where x is the major version -// number, y is the minor version number, and z is the patch level if not 0. -// This is used by to select which library version to link to. - -#define BOOST_LIB_VERSION "1_65_1" - -#endif diff --git a/native_client/ctcdecode/Makefile b/native_client/ctcdecode/Makefile index 98040d6f0b..962e917f7b 100644 --- a/native_client/ctcdecode/Makefile +++ b/native_client/ctcdecode/Makefile @@ -4,15 +4,23 @@ include ../definitions.mk NUM_PROCESSES ?= 1 +# ARM64 can't find the proper libm.so without this +ifeq ($(TARGET),rpi3-armv8) +LDFLAGS_NEEDED += $(RASPBIAN)/lib/aarch64-linux-gnu/libm.so.6 +endif + all: bindings -clean: +clean-keep-common: rm -rf dist temp_build ds_ctcdecoder.egg-info rm -f swigwrapper_wrap.cpp swigwrapper.py -bindings: clean +clean: clean-keep-common + rm -f common.a + +bindings: clean-keep-common pip install --quiet $(PYTHON_PACKAGES) wheel==0.31.0 setuptools==39.1.0 - AS=$(AS) CC=$(CC) CXX=$(CXX) LD=$(LD) CFLAGS="$(CFLAGS) $(CXXFLAGS)" LDFLAGS="$(LDFLAGS_NEEDED)" $(PYTHON_PATH) $(NUMPY_INCLUDE) python ./setup.py build --num_processes $(NUM_PROCESSES) $(PYTHON_PLATFORM_NAME) $(SETUP_FLAGS) + AS=$(AS) CC=$(CC) CXX=$(CXX) LD=$(LD) CFLAGS="$(CFLAGS) $(CXXFLAGS)" LDFLAGS="$(LDFLAGS_NEEDED)" $(PYTHON_PATH) $(NUMPY_INCLUDE) python ./setup.py build_ext --num_processes $(NUM_PROCESSES) $(PYTHON_PLATFORM_NAME) $(SETUP_FLAGS) find temp_build -type f -name "*.o" -delete AS=$(AS) CC=$(CC) CXX=$(CXX) LD=$(LD) CFLAGS="$(CFLAGS) $(CXXFLAGS)" LDFLAGS="$(LDFLAGS_NEEDED)" $(PYTHON_PATH) $(NUMPY_INCLUDE) python ./setup.py bdist_wheel --num_processes $(NUM_PROCESSES) $(PYTHON_PLATFORM_NAME) $(SETUP_FLAGS) rm -rf temp_build diff --git a/native_client/ctcdecode/__init__.py b/native_client/ctcdecode/__init__.py index cc984557de..e79b02cda6 100644 --- a/native_client/ctcdecode/__init__.py +++ b/native_client/ctcdecode/__init__.py @@ -27,7 +27,7 @@ def ctc_beam_search_decoder(probs_seq, beam_size, cutoff_prob=1.0, cutoff_top_n=40, - ext_scoring_func=None): + scorer=None): """Wrapper for the CTC Beam Search Decoder. :param probs_seq: 2-D list of probability distributions over each time @@ -45,17 +45,16 @@ def ctc_beam_search_decoder(probs_seq, characters with highest probs in alphabet will be used in beam search, default 40. :type cutoff_top_n: int - :param ext_scoring_func: External scoring function for - partially decoded sentence, e.g. word count - or language model. - :type external_scoring_func: callable + :param scorer: External scorer for partially decoded sentence, e.g. word + count or language model. + :type scorer: Scorer :return: List of tuples of log probability and sentence as decoding results, in descending order of the probability. :rtype: list """ beam_results = swigwrapper.ctc_beam_search_decoder( probs_seq, alphabet.config_file(), beam_size, cutoff_prob, cutoff_top_n, - ext_scoring_func) + scorer) beam_results = [(res.probability, alphabet.decode(res.tokens)) for res in beam_results] return beam_results @@ -67,7 +66,7 @@ def ctc_beam_search_decoder_batch(probs_seq, num_processes, cutoff_prob=1.0, cutoff_top_n=40, - ext_scoring_func=None): + scorer=None): """Wrapper for the batched CTC beam search decoder. :param probs_seq: 3-D list with each element as an instance of 2-D list @@ -88,17 +87,16 @@ def ctc_beam_search_decoder_batch(probs_seq, :type cutoff_top_n: int :param num_processes: Number of parallel processes. :type num_processes: int - :param ext_scoring_func: External scoring function for - partially decoded sentence, e.g. word count - or language model. - :type external_scoring_function: callable + :param scorer: External scorer for partially decoded sentence, e.g. word + count or language model. + :type scorer: Scorer :return: List of tuples of log probability and sentence as decoding results, in descending order of the probability. :rtype: list """ batch_beam_results = swigwrapper.ctc_beam_search_decoder_batch( probs_seq, seq_lengths, alphabet.config_file(), beam_size, num_processes, - cutoff_prob, cutoff_top_n, ext_scoring_func) + cutoff_prob, cutoff_top_n, scorer) batch_beam_results = [ [(res.probability, alphabet.decode(res.tokens)) for res in beam_results] for beam_results in batch_beam_results diff --git a/native_client/ctcdecode/build_common.py b/native_client/ctcdecode/build_common.py new file mode 100644 index 0000000000..be1907215b --- /dev/null +++ b/native_client/ctcdecode/build_common.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python +from __future__ import absolute_import, division, print_function + +import glob +import os +import shlex +import subprocess +import sys + +from multiprocessing.dummy import Pool + +ARGS = ['-O3', '-DNDEBUG', '-DKENLM_MAX_ORDER=6', '-std=c++11', + '-Wno-unused-local-typedef', '-Wno-sign-compare'] + +INCLUDES = [ + '..', + '../kenlm', + 'third_party/openfst-1.6.7/src/include', + 'third_party/ThreadPool' +] + +COMMON_FILES = (glob.glob('../kenlm/util/*.cc') + + glob.glob('../kenlm/lm/*.cc') + + glob.glob('../kenlm/util/double-conversion/*.cc')) + +COMMON_FILES += glob.glob('third_party/openfst-1.6.7/src/lib/*.cc') + +COMMON_FILES = [ + fn for fn in COMMON_FILES + if not (fn.endswith('main.cc') or fn.endswith('test.cc') or fn.endswith( + 'unittest.cc')) +] + +COMMON_FILES += glob.glob('*.cpp') + +def build_common(out_name='common.a', build_dir='temp_build/temp_build', num_parallel=1): + compiler = os.environ.get('CXX', 'g++') + ar = os.environ.get('AR', 'ar') + libtool = os.environ.get('LIBTOOL', 'libtool') + cflags = os.environ.get('CFLAGS', '') + os.environ.get('CXXFLAGS', '') + + for file in COMMON_FILES: + outfile = os.path.join(build_dir, os.path.splitext(file)[0] + '.o') + outdir = os.path.dirname(outfile) + if not os.path.exists(outdir): + print('mkdir', outdir) + os.makedirs(outdir) + + def build_one(file): + outfile = os.path.join(build_dir, os.path.splitext(file)[0] + '.o') + if os.path.exists(outfile): + return + + cmd = '{cc} -fPIC -c {cflags} {args} {includes} {infile} -o {outfile}'.format( + cc=compiler, + cflags=cflags, + args=' '.join(ARGS), + includes=' '.join('-I' + i for i in INCLUDES), + infile=file, + outfile=outfile, + ) + print(cmd) + subprocess.check_call(shlex.split(cmd)) + return outfile + + pool = Pool(num_parallel) + obj_files = list(pool.imap_unordered(build_one, COMMON_FILES)) + + if sys.platform.startswith('darwin'): + cmd = '{libtool} -static -o {outfile} {infiles}'.format( + libtool=libtool, + outfile=out_name, + infiles=' '.join(obj_files), + ) + print(cmd) + subprocess.check_call(shlex.split(cmd)) + else: + cmd = '{ar} rcs {outfile} {infiles}'.format( + ar=ar, + outfile=out_name, + infiles=' '.join(obj_files) + ) + print(cmd) + subprocess.check_call(shlex.split(cmd)) + +if __name__ == '__main__': + build_common() diff --git a/native_client/ctcdecode/scorer.cpp b/native_client/ctcdecode/scorer.cpp index 05ed356706..6aeec6c3a7 100644 --- a/native_client/ctcdecode/scorer.cpp +++ b/native_client/ctcdecode/scorer.cpp @@ -43,10 +43,21 @@ Scorer::Scorer(double alpha, setup(lm_path, trie_path); } -Scorer::~Scorer() { +Scorer::Scorer(double alpha, + double beta, + const std::string& lm_path, + const std::string& trie_path, + const std::string& alphabet_config_path) + : Scorer(alpha, beta, lm_path, trie_path, Alphabet(alphabet_config_path.c_str())) +{ } -void Scorer::setup(const std::string& lm_path, const std::string& trie_path) { +Scorer::~Scorer() +{ +} + +void Scorer::setup(const std::string& lm_path, const std::string& trie_path) +{ // load language model const char* filename = lm_path.c_str(); VALID_CHECK_EQ(access(filename, R_OK), 0, "Invalid language model path"); @@ -104,7 +115,8 @@ void Scorer::setup(const std::string& lm_path, const std::string& trie_path) { max_order_ = language_model_->Order(); } -void Scorer::save_dictionary(const std::string& path) { +void Scorer::save_dictionary(const std::string& path) +{ std::ofstream fout(path, std::ios::binary); fout.write(reinterpret_cast(&MAGIC), sizeof(MAGIC)); fout.write(reinterpret_cast(&FILE_VERSION), sizeof(FILE_VERSION)); @@ -113,8 +125,9 @@ void Scorer::save_dictionary(const std::string& path) { dictionary->Write(fout, opt); } -double Scorer::get_log_cond_prob(const std::vector& words) { - double cond_prob; +double Scorer::get_log_cond_prob(const std::vector& words) +{ + double cond_prob = OOV_SCORE; lm::ngram::State state, tmp_state, out_state; // avoid to inserting in begin language_model_->NullContextWrite(&state); @@ -133,7 +146,8 @@ double Scorer::get_log_cond_prob(const std::vector& words) { return cond_prob/NUM_FLT_LOGE; } -double Scorer::get_sent_log_prob(const std::vector& words) { +double Scorer::get_sent_log_prob(const std::vector& words) +{ std::vector sentence; if (words.size() == 0) { for (size_t i = 0; i < max_order_; ++i) { @@ -149,7 +163,8 @@ double Scorer::get_sent_log_prob(const std::vector& words) { return get_log_prob(sentence); } -double Scorer::get_log_prob(const std::vector& words) { +double Scorer::get_log_prob(const std::vector& words) +{ assert(words.size() > max_order_); double score = 0.0; for (size_t i = 0; i < words.size() - max_order_ + 1; ++i) { @@ -160,12 +175,14 @@ double Scorer::get_log_prob(const std::vector& words) { return score; } -void Scorer::reset_params(float alpha, float beta) { +void Scorer::reset_params(float alpha, float beta) +{ this->alpha = alpha; this->beta = beta; } -std::vector Scorer::split_labels(const std::vector& labels) { +std::vector Scorer::split_labels(const std::vector& labels) +{ if (labels.empty()) return {}; std::string s = alphabet_.LabelsToString(labels); @@ -178,7 +195,8 @@ std::vector Scorer::split_labels(const std::vector& labels) { return words; } -std::vector Scorer::make_ngram(PathTrie* prefix) { +std::vector Scorer::make_ngram(PathTrie* prefix) +{ std::vector ngram; PathTrie* current_node = prefix; PathTrie* new_node = nullptr; @@ -211,7 +229,8 @@ std::vector Scorer::make_ngram(PathTrie* prefix) { return ngram; } -void Scorer::fill_dictionary(const std::vector& vocabulary, bool add_space) { +void Scorer::fill_dictionary(const std::vector& vocabulary, bool add_space) +{ fst::StdVectorFst dictionary; // For each unigram convert to ints and put in trie for (const auto& word : vocabulary) { diff --git a/native_client/ctcdecode/scorer.h b/native_client/ctcdecode/scorer.h index 4841d7b107..9a81d4d6c8 100644 --- a/native_client/ctcdecode/scorer.h +++ b/native_client/ctcdecode/scorer.h @@ -46,6 +46,11 @@ class Scorer { const std::string &lm_path, const std::string &trie_path, const Alphabet &alphabet); + Scorer(double alpha, + double beta, + const std::string &lm_path, + const std::string &trie_path, + const std::string &alphabet_config_path); ~Scorer(); double get_log_cond_prob(const std::vector &words); diff --git a/native_client/ctcdecode/setup.py b/native_client/ctcdecode/setup.py index c8caf0c92c..c6c256cc1f 100644 --- a/native_client/ctcdecode/setup.py +++ b/native_client/ctcdecode/setup.py @@ -5,12 +5,13 @@ from setuptools import setup, Extension, distutils import argparse -import glob import multiprocessing.pool import os import platform import sys +from build_common import * + try: import numpy try: @@ -40,72 +41,25 @@ def read(fname): project_version = read('../../VERSION').strip() -# monkey-patch for parallel compilation -# See: https://stackoverflow.com/a/13176803 -def parallelCCompile(self, - sources, - output_dir=None, - macros=None, - include_dirs=None, - debug=0, - extra_preargs=None, - extra_postargs=None, - depends=None): - # those lines are copied from distutils.ccompiler.CCompiler directly - macros, objects, extra_postargs, pp_opts, build = self._setup_compile( - output_dir, macros, include_dirs, sources, depends, extra_postargs) - cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) - - # parallel code - def _single_compile(obj): - try: - src, ext = build[obj] - except KeyError: - return - self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) - - # convert to list, imap is evaluated on-demand - thread_pool = multiprocessing.pool.ThreadPool(args[0].num_processes) - list(thread_pool.imap(_single_compile, objects)) - return objects - -# hack compile to support parallel compiling -distutils.ccompiler.CCompiler.compile = parallelCCompile - -FILES = glob.glob('../kenlm/util/*.cc') \ - + glob.glob('../kenlm/lm/*.cc') \ - + glob.glob('../kenlm/util/double-conversion/*.cc') - -FILES += glob.glob('third_party/openfst-1.6.7/src/lib/*.cc') - -FILES = [ - fn for fn in FILES - if not (fn.endswith('main.cc') or fn.endswith('test.cc') or fn.endswith( - 'unittest.cc')) -] - -LIBS = ['stdc++'] -if platform.system() != 'Darwin': - LIBS.append('rt') +build_dir = 'temp_build/temp_build' +common_build = 'common.a' -ARGS = ['-O3', '-DNDEBUG', '-DKENLM_MAX_ORDER=6', '-std=c++11', - '-Wno-unused-local-typedef', '-Wno-sign-compare'] +if not os.path.exists(common_build): + if not os.path.exists(build_dir): + os.makedirs(build_dir) + build_common(out_name='common.a', + build_dir=build_dir, + num_parallel=args[0].num_processes) decoder_module = Extension( name='ds_ctcdecoder._swigwrapper', - sources=['swigwrapper.i'] + FILES + glob.glob('*.cpp'), + sources=['swigwrapper.i'], swig_opts=['-c++', '-extranative'], language='c++', - include_dirs=[ - numpy_include, - '..', - '../kenlm', - 'third_party/openfst-1.6.7/src/include', - 'third_party/ThreadPool', - ], - libraries=LIBS, - extra_compile_args=ARGS + include_dirs=INCLUDES + [numpy_include], + extra_compile_args=ARGS, + extra_link_args=[common_build], ) class BuildExtFirst(build): diff --git a/native_client/ctcdecode/swigwrapper.i b/native_client/ctcdecode/swigwrapper.i index 7cba3ac613..9c16e68b64 100644 --- a/native_client/ctcdecode/swigwrapper.i +++ b/native_client/ctcdecode/swigwrapper.i @@ -6,6 +6,7 @@ %} %include "pyabc.i" +%include "std_string.i" %include "std_vector.i" %include "numpy.i" @@ -61,6 +62,9 @@ mod_decoder_batch(const double *probs, } %} + +%ignore Scorer::dictionary; + %include "output.h" %include "scorer.h" %include "ctc_beam_search_decoder.h" diff --git a/native_client/trie_node.h b/native_client/trie_node.h deleted file mode 100644 index 005145db75..0000000000 --- a/native_client/trie_node.h +++ /dev/null @@ -1,193 +0,0 @@ -/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -==============================================================================*/ - -#ifndef TRIE_NODE_H -#define TRIE_NODE_H - -#include "lm/model.hh" - -#include -#include -#include -#include -#include -#include - -#include - -static const int MAGIC = 'TRIE'; -static const int FILE_VERSION = 2; - -class TrieNode { -public: - - TrieNode(int vocab_size) - : vocab_size_(vocab_size) - , prefixCount_(0) - , min_score_word_(0) - , min_unigram_score_(std::numeric_limits::max()) - { - children_ = new TrieNode*[vocab_size_](); - } - - ~TrieNode() { - for (int i = 0; i < vocab_size_; i++) { - delete children_[i]; - } - delete[] children_; - } - - void WriteToStream(std::ostream& os) const { - os.write(reinterpret_cast(&MAGIC), sizeof(MAGIC)); - os.write(reinterpret_cast(&FILE_VERSION), sizeof(FILE_VERSION)); - os.write(reinterpret_cast(&vocab_size_), sizeof(vocab_size_)); - WriteNodeAndChildren(os); - } - - static void ReadFromStream(std::istream& is, TrieNode* &obj, int vocab_size) { - int magic; - is.read(reinterpret_cast(&magic), sizeof(magic)); - if (magic != MAGIC) { - std::cerr << "Error: Can't parse trie file, invalid header. Try updating " - "your trie file." << std::endl; - obj = nullptr; - return; - } - - int version; - is.read(reinterpret_cast(&version), sizeof(version)); - if (version != FILE_VERSION) { - std::cerr << "Error: Trie file version mismatch (" << version - << " instead of expected " << FILE_VERSION - << "). Update your trie file." - << std::endl; - obj = nullptr; - return; - } - - int fileVocabSize; - is.read(reinterpret_cast(&fileVocabSize), sizeof(fileVocabSize)); - if (fileVocabSize != vocab_size) { - std::cerr << "Error: Mismatching alphabet size in trie file and alphabet " - "file. Trie file will not be loaded." << std::endl; - obj = nullptr; - return; - } - - ReadPrefixAndNode(is, obj, vocab_size); - } - - void Insert(const std::string& word, std::function translator, - lm::WordIndex lm_word, float unigram_score) { - // All strings are UTF-8 encoded at the API boundaries. We need to iterate - // on codepoints in order to support multi-byte characters, so we convert - // to UCS-4 to extract the first codepoint, then the codepoint back to - // UTF-8 to translate it into a vocabulary index. - - //TODO We should normalize the input first, and possibly iterate by grapheme - // instead of codepoint for languages that don't have composed versions - // of multi-codepoint characters. This requires extra dependencies so - // leaving as a future improvement when the need arises. - using namespace boost::locale::conv; - std::u32string codepoints = utf_to_utf(word, method_type::stop); - Insert(codepoints.begin(), translator, lm_word, unigram_score); - } - - int GetPrefixCount() const { - return prefixCount_; - } - - lm::WordIndex GetMinScoreWordIndex() const { - return min_score_word_; - } - - float GetMinUnigramScore() const { - return min_unigram_score_; - } - - TrieNode *GetChildAt(int vocabIndex) { - return children_[vocabIndex]; - } - -private: - int vocab_size_; - int prefixCount_; - lm::WordIndex min_score_word_; - float min_unigram_score_; - TrieNode **children_; - - void Insert(const std::u32string::iterator& codepoints, - std::function translator, - lm::WordIndex lm_word, float unigram_score) { - using namespace boost::locale::conv; - char32_t firstCodepoint[2] = {*codepoints, 0}; - std::string firstCodepoint_utf8 = - utf_to_utf(firstCodepoint, method_type::stop); - - prefixCount_++; - if (unigram_score < min_unigram_score_) { - min_unigram_score_ = unigram_score; - min_score_word_ = lm_word; - } - if (firstCodepoint[0] != 0) { - int vocabIndex = translator(firstCodepoint_utf8); - if (children_[vocabIndex] == nullptr) { - children_[vocabIndex] = new TrieNode(vocab_size_); - } - children_[vocabIndex]->Insert(codepoints+1, translator, lm_word, unigram_score); - } - } - - void WriteNode(std::ostream& os) const { - os.write(reinterpret_cast(&prefixCount_), sizeof(prefixCount_)); - os.write(reinterpret_cast(&min_score_word_), sizeof(min_score_word_)); - os.write(reinterpret_cast(&min_unigram_score_), sizeof(min_unigram_score_)); - } - - void ReadNode(std::istream& is, int first_input) { - prefixCount_ = first_input; - is.read(reinterpret_cast(&min_score_word_), sizeof(min_score_word_)); - is.read(reinterpret_cast(&min_unigram_score_), sizeof(min_unigram_score_)); - } - - void WriteNodeAndChildren(std::ostream& os) const { - int noChildren = -1; - WriteNode(os); - for (int i = 0; i < vocab_size_; i++) { - if (children_[i] == nullptr) { - os.write(reinterpret_cast(&noChildren), sizeof(noChildren)); - } else { - // Recursive call - children_[i]->WriteNodeAndChildren(os); - } - } - } - - static void ReadPrefixAndNode(std::istream& is, TrieNode* &obj, int vocab_size) { - int prefixCount; - is.read(reinterpret_cast(&prefixCount), sizeof(prefixCount)); - - if (prefixCount == -1) { - // This is an undefined child - obj = nullptr; - return; - } - - obj = new TrieNode(vocab_size); - obj->ReadNode(is, prefixCount); - for (int i = 0; i < vocab_size; i++) { - ReadPrefixAndNode(is, obj->children_[i], vocab_size); - } - } -}; - -#endif //TRIE_NODE_H diff --git a/requirements.txt b/requirements.txt index 03cc814d6a..8feeb860a4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,3 +13,5 @@ bs4 six requests tables +attrdict +setuptools diff --git a/taskcluster/cuda-build.sh b/taskcluster/cuda-build.sh index 3ccf576980..cc3a602277 100755 --- a/taskcluster/cuda-build.sh +++ b/taskcluster/cuda-build.sh @@ -24,5 +24,3 @@ do_deepspeech_binary_build do_deepspeech_python_build rename_to_gpu do_deepspeech_nodejs_build rename_to_gpu - -$(dirname "$0")/decoder-build.sh diff --git a/taskcluster/decoder-build.sh b/taskcluster/decoder-build.sh index da47cfd39b..a1dee09a49 100755 --- a/taskcluster/decoder-build.sh +++ b/taskcluster/decoder-build.sh @@ -4,10 +4,6 @@ set -xe source $(dirname "$0")/../tc-tests-utils.sh -source ${DS_ROOT_TASK}/DeepSpeech/tf/tc-vars.sh +export SYSTEM_TARGET=host -BAZEL_ENV_FLAGS="TF_NEED_CUDA=0" -BAZEL_BUILD_FLAGS="${BAZEL_OPT_FLAGS} ${BAZEL_EXTRA_FLAGS}" -BAZEL_TARGETS="${BAZEL_CTC_TARGETS}" - -do_bazel_shared_build +do_deepspeech_decoder_build diff --git a/taskcluster/decoder-package.sh b/taskcluster/decoder-package.sh index 40e63d4706..f827ae7cdb 100755 --- a/taskcluster/decoder-package.sh +++ b/taskcluster/decoder-package.sh @@ -6,5 +6,7 @@ source $(dirname "$0")/../tc-tests-utils.sh mkdir -p ${TASKCLUSTER_ARTIFACTS} || true -tar -cf - \ - -C ${DS_TFDIR}/bazel-bin/native_client/ libctc_decoder_with_kenlm.so | pixz -9 > "${TASKCLUSTER_ARTIFACTS}/decoder.tar.xz" +if [ -d ${DS_ROOT_TASK}/DeepSpeech/ds/wheels ]; then + cp ${DS_ROOT_TASK}/DeepSpeech/ds/wheels/* ${TASKCLUSTER_ARTIFACTS}/ +fi; + diff --git a/taskcluster/host-build.sh b/taskcluster/host-build.sh index 66b5ba7c3a..3b3f3cd9f3 100755 --- a/taskcluster/host-build.sh +++ b/taskcluster/host-build.sh @@ -19,8 +19,12 @@ do_bazel_build do_deepspeech_binary_build +# Decoder packages for Linux are built a separate task +if [ "${OS}" = "Darwin" ]; then + do_deepspeech_decoder_build +fi + do_deepspeech_python_build do_deepspeech_nodejs_build -$(dirname "$0")/decoder-build.sh diff --git a/taskcluster/linux-amd64-ctc-opt.yml b/taskcluster/linux-amd64-ctc-opt.yml index 3289723894..ff2ee39a75 100644 --- a/taskcluster/linux-amd64-ctc-opt.yml +++ b/taskcluster/linux-amd64-ctc-opt.yml @@ -1,13 +1,21 @@ build: + template_file: linux-opt-base.tyml allowed: - "pull_request.opened" - "pull_request.synchronize" - "pull_request.reopened" - template_file: linux-opt-base.tyml + system_setup: + > + ${nodejs.packages_trusty.prep_8} && ${nodejs.packages_trusty.apt_pinning} + && apt-get -qq update && apt-get -qq -y install nodejs python-yaml && + apt-get -qq -y install ${python.packages_trusty.apt} && ${swig.packages.install_script} + system_config: + > + ${swig.patch_nodejs.linux} tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.12.bea86c1e884730cf7f8615eb24d31872c198c766.cpu/artifacts/public/home.tar.xz" scripts: build: 'taskcluster/decoder-build.sh' package: 'taskcluster/decoder-package.sh' metadata: - name: "DeepSpeech CTC KenLM Decoder Linux AMD64 CPU" - description: "Building DeepSpeech CTC KenLM Decoder for Linux/AMD64, CPU only, optimized version" + name: "DeepSpeech CTC Decoder Linux AMD64 CPU" + description: "Building DeepSpeech CTC Decoder for Linux/AMD64, CPU only, optimized version" diff --git a/taskcluster/test-linux-opt-base.tyml b/taskcluster/test-linux-opt-base.tyml index ebf9da7c18..4036adcf58 100644 --- a/taskcluster/test-linux-opt-base.tyml +++ b/taskcluster/test-linux-opt-base.tyml @@ -40,10 +40,10 @@ then: BENCHMARK_MODEL_BIN: ${build.benchmark_model_bin} DEEPSPEECH_ARTIFACTS_ROOT: https://queue.taskcluster.net/v1/task/${linux_amd64_build}/artifacts/public DEEPSPEECH_NODEJS: https://queue.taskcluster.net/v1/task/${node_package}/artifacts/public - DEEPSPEECH_LIBCTC: https://queue.taskcluster.net/v1/task/${linux_amd64_ctc}/artifacts/public/decoder.tar.xz DEEPSPEECH_TEST_MODEL: https://queue.taskcluster.net/v1/task/${training}/artifacts/public/output_graph.pb DEEPSPEECH_PROD_MODEL: https://github.com/reuben/DeepSpeech/releases/download/v0.2.0-prod-ctcdecode/output_graph.pb DEEPSPEECH_PROD_MODEL_MMAP: https://github.com/reuben/DeepSpeech/releases/download/v0.2.0-prod-ctcdecode/output_graph.pbmm + DECODER_ARTIFACTS_ROOT: https://queue.taskcluster.net/v1/task/${linux_amd64_ctc}/artifacts/public PIP_DEFAULT_TIMEOUT: "60" EXPECTED_TENSORFLOW_VERSION: "TensorFlow: v1.12.0-rc2-11-gbea86c1" diff --git a/taskcluster/test-training_upstream+deepspeech-linux-amd64-py27mu-opt.yml b/taskcluster/test-training_upstream+deepspeech-linux-amd64-py27mu-opt.yml deleted file mode 100644 index 12c9f63167..0000000000 --- a/taskcluster/test-training_upstream+deepspeech-linux-amd64-py27mu-opt.yml +++ /dev/null @@ -1,13 +0,0 @@ -build: - template_file: test-linux-opt-base.tyml - dependencies: - - "linux-amd64-ctc-opt" - - "linux-amd64-cpu-opt" - system_setup: - > - apt-get -qq -y install ${python.packages_trusty.apt} - args: - tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/tc-train-tests.sh 2.7.14:mu deepspeech" - metadata: - name: "DeepSpeech Linux AMD64 CPU upstream training Py2.7 mu (DS)" - description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 using upstream TensorFlow Python 2.7 mu with DeepSpeech package installed, CPU only, optimized version" diff --git a/taskcluster/test-training_upstream+deepspeech-linux-amd64-py36m-opt.yml b/taskcluster/test-training_upstream+deepspeech-linux-amd64-py36m-opt.yml deleted file mode 100644 index f666a77b52..0000000000 --- a/taskcluster/test-training_upstream+deepspeech-linux-amd64-py36m-opt.yml +++ /dev/null @@ -1,13 +0,0 @@ -build: - template_file: test-linux-opt-base.tyml - dependencies: - - "linux-amd64-ctc-opt" - - "linux-amd64-cpu-opt" - system_setup: - > - apt-get -qq -y install ${python.packages_trusty.apt} - args: - tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/tc-train-tests.sh 3.6.4:m deepspeech" - metadata: - name: "DeepSpeech Linux AMD64 CPU upstream training Py3.6 (DS)" - description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 using upstream TensorFlow Python 3.6 with DeepSpeech package installed, CPU only, optimized version" diff --git a/tc-single-shot-inference.sh b/tc-single-shot-inference.sh index 7d1e23141f..e7d229d722 100755 --- a/tc-single-shot-inference.sh +++ b/tc-single-shot-inference.sh @@ -44,7 +44,13 @@ source ${PYENV_ROOT}/versions/${pyver}/envs/${PYENV_NAME}/bin/activate pip install --upgrade -r ${HOME}/DeepSpeech/ds/requirements.txt | cat -download_ctc_kenlm "/tmp/ds" +platform=$(python -c 'import sys; import platform; plat = platform.system().lower(); arch = platform.machine().lower(); plat = "manylinux1" if plat == "linux" and arch == "x86_64" else plat; plat = "macosx_10_10" if plat == "darwin" else plat; sys.stdout.write("%s_%s" % (plat, platform.machine()));') +whl_ds_version="$(python -c 'from pkg_resources import parse_version; print(parse_version("'${DS_VERSION}'"))')" +decoder_pkg="ds_ctcdecoder-${whl_ds_version}-cp${pyver_pkg}-cp${pyver_pkg}${py_unicode_type}-${platform}.whl" + +decoder_pkg_url=${DECODER_ARTIFACTS_ROOT}/${decoder_pkg} + +LD_LIBRARY_PATH=${PY37_LDPATH}:$LD_LIBRARY_PATH pip install --verbose --only-binary :all: ${PY37_SOURCE_PACKAGE} --upgrade ${decoder_pkg_url} | cat pushd ${HOME}/DeepSpeech/ds/ time ./bin/run-tc-ldc93s1_singleshotinference.sh diff --git a/tc-tests-utils.sh b/tc-tests-utils.sh index 62ede7595b..ba40617b23 100755 --- a/tc-tests-utils.sh +++ b/tc-tests-utils.sh @@ -2,7 +2,7 @@ set -xe -OS=$(uname) +export OS=$(uname) if [ "${OS}" = "Linux" ]; then export DS_ROOT_TASK=${HOME} fi; @@ -26,8 +26,6 @@ mkdir -p ${TASKCLUSTER_TMP_DIR} || true export DS_TFDIR=${DS_ROOT_TASK}/DeepSpeech/tf export DS_DSDIR=${DS_ROOT_TASK}/DeepSpeech/ds -export BAZEL_CTC_TARGETS="//native_client:libctc_decoder_with_kenlm.so" - export DS_VERSION="$(cat ${DS_DSDIR}/VERSION)" model_source="${DEEPSPEECH_TEST_MODEL}" @@ -250,11 +248,6 @@ download_native_client_files() generic_download_tarxz "$1" "${DEEPSPEECH_ARTIFACTS_ROOT}/native_client.tar.xz" } -download_ctc_kenlm() -{ - generic_download_tarxz "$1" "${DEEPSPEECH_LIBCTC}" -} - download_data() { wget -P "${TASKCLUSTER_TMP_DIR}" "${model_source}" @@ -262,7 +255,7 @@ download_data() cp ${DS_ROOT_TASK}/DeepSpeech/ds/data/smoke_test/*.wav ${TASKCLUSTER_TMP_DIR}/ cp ${DS_ROOT_TASK}/DeepSpeech/ds/data/alphabet.txt ${TASKCLUSTER_TMP_DIR}/alphabet.txt cp ${DS_ROOT_TASK}/DeepSpeech/ds/data/smoke_test/vocab.pruned.lm ${TASKCLUSTER_TMP_DIR}/lm.binary - cp ${DS_ROOT_TASK}/DeepSpeech/ds/data/smoke_test/vocab.trie.ctcdecode ${TASKCLUSTER_TMP_DIR}/trie + cp ${DS_ROOT_TASK}/DeepSpeech/ds/data/smoke_test/vocab.trie ${TASKCLUSTER_TMP_DIR}/trie } download_material() @@ -292,10 +285,13 @@ install_pyenv() exit 1; fi; - git clone --quiet https://github.com/pyenv/pyenv.git ${PYENV_ROOT} - pushd ${PYENV_ROOT} - git checkout --quiet 835707da2237b8f69560b2de27ae8ddd3e6cb1a4 - popd + if [ ! -e "${PYENV_ROOT}/bin/pyenv" ]; then + git clone --quiet https://github.com/pyenv/pyenv.git ${PYENV_ROOT} + pushd ${PYENV_ROOT} + git checkout --quiet 835707da2237b8f69560b2de27ae8ddd3e6cb1a4 + popd + fi + eval "$(pyenv init -)" } @@ -308,10 +304,13 @@ install_pyenv_virtualenv() exit 1; fi; - git clone --quiet https://github.com/pyenv/pyenv-virtualenv.git ${PYENV_VENV} - pushd ${PYENV_VENV} - git checkout --quiet 5419dc732066b035a28680475acd7b661c7c397d - popd + if [ ! -e "${PYENV_VENV}/bin/pyenv-virtualenv" ]; then + git clone --quiet https://github.com/pyenv/pyenv-virtualenv.git ${PYENV_VENV} + pushd ${PYENV_VENV} + git checkout --quiet 5419dc732066b035a28680475acd7b661c7c397d + popd + fi; + eval "$(pyenv virtualenv-init -)" } @@ -431,6 +430,11 @@ maybe_ssl102_py37() 3.7*) if [ "${OS}" = "Linux" ]; then PY37_OPENSSL_DIR=${DS_ROOT_TASK}/ssl-xenial + + if [ -d "${PY37_OPENSSL_DIR}" ]; then + rm -rf "${PY37_OPENSSL_DIR}" + fi + mkdir -p ${PY37_OPENSSL_DIR} wget -P ${TASKCLUSTER_TMP_DIR} \ http://${TASKCLUSTER_WORKER_GROUP}.ec2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.0.2g-1ubuntu4.13_amd64.deb \ @@ -459,6 +463,8 @@ maybe_ssl102_py37() do_deepspeech_python_build() { + cd ${DS_DSDIR} + rename_to_gpu=$1 unset PYTHON_BIN_PATH @@ -515,6 +521,58 @@ do_deepspeech_python_build() done; } +do_deepspeech_decoder_build() +{ + cd ${DS_DSDIR} + + unset PYTHON_BIN_PATH + unset PYTHONPATH + export PYENV_ROOT="${DS_ROOT_TASK}/DeepSpeech/.pyenv" + export PATH="${PYENV_ROOT}/bin:$PATH" + + install_pyenv "${PYENV_ROOT}" + install_pyenv_virtualenv "$(pyenv root)/plugins/pyenv-virtualenv" + + mkdir -p wheels + + for pyver_conf in ${SUPPORTED_PYTHON_VERSIONS}; do + pyver=$(echo "${pyver_conf}" | cut -d':' -f1) + pyconf=$(echo "${pyver_conf}" | cut -d':' -f2) + + export NUMPY_BUILD_VERSION="==1.7.0" + export NUMPY_DEP_VERSION=">=1.7.0" + + maybe_ssl102_py37 ${pyver} + + LD_LIBRARY_PATH=${PY37_LDPATH}:$LD_LIBRARY_PATH PYTHON_CONFIGURE_OPTS="--enable-unicode=${pyconf} ${PY37_OPENSSL}" pyenv install ${pyver} + + pyenv virtualenv ${pyver} deepspeech + source ${PYENV_ROOT}/versions/${pyver}/envs/deepspeech/bin/activate + + # Set LD path because python ssl might require it + LD_LIBRARY_PATH=${PY37_LDPATH}:$LD_LIBRARY_PATH \ + EXTRA_CFLAGS="${EXTRA_LOCAL_CFLAGS}" \ + EXTRA_LDFLAGS="${EXTRA_LOCAL_LDFLAGS}" \ + EXTRA_LIBS="${EXTRA_LOCAL_LIBS}" \ + make -C native_client/ctcdecode/ \ + TARGET=${SYSTEM_TARGET} \ + RASPBIAN=${SYSTEM_RASPBIAN} \ + TFDIR=${DS_TFDIR} \ + bindings + + cp native_client/ctcdecode/dist/*.whl wheels + + make -C native_client/ctcdecode clean-keep-common + + unset NUMPY_BUILD_VERSION + unset NUMPY_DEP_VERSION + + deactivate + pyenv uninstall --force deepspeech + pyenv uninstall --force ${pyver} + done; +} + do_deepspeech_nodejs_build() { rename_to_gpu=$1 @@ -590,7 +648,6 @@ package_native_client() if [ -f "${tensorflow_dir}/bazel-bin/native_client/libdeepspeech_model.so" ]; then tar -cf - \ -C ${tensorflow_dir}/bazel-bin/native_client/ generate_trie \ - -C ${tensorflow_dir}/bazel-bin/native_client/ libctc_decoder_with_kenlm.so \ -C ${tensorflow_dir}/bazel-bin/native_client/ libdeepspeech.so \ -C ${tensorflow_dir}/bazel-bin/native_client/ libdeepspeech_model.so \ -C ${deepspeech_dir}/ LICENSE \ @@ -600,7 +657,6 @@ package_native_client() else tar -cf - \ -C ${tensorflow_dir}/bazel-bin/native_client/ generate_trie \ - -C ${tensorflow_dir}/bazel-bin/native_client/ libctc_decoder_with_kenlm.so \ -C ${tensorflow_dir}/bazel-bin/native_client/ libdeepspeech.so \ -C ${deepspeech_dir}/ LICENSE \ -C ${deepspeech_dir}/native_client/ deepspeech \ diff --git a/tc-train-tests.sh b/tc-train-tests.sh index 5452fee21d..e685baf9d7 100644 --- a/tc-train-tests.sh +++ b/tc-train-tests.sh @@ -45,20 +45,11 @@ pip install --upgrade -r ${HOME}/DeepSpeech/ds/requirements.txt | cat platform=$(python -c 'import sys; import platform; plat = platform.system().lower(); arch = platform.machine().lower(); plat = "manylinux1" if plat == "linux" and arch == "x86_64" else plat; plat = "macosx_10_10" if plat == "darwin" else plat; sys.stdout.write("%s_%s" % (plat, platform.machine()));') whl_ds_version="$(python -c 'from pkg_resources import parse_version; print(parse_version("'${DS_VERSION}'"))')" -deepspeech_pkg="deepspeech-${whl_ds_version}-cp${pyver_pkg}-cp${pyver_pkg}${py_unicode_type}-${platform}.whl" - -if [ "${ds}" = "deepspeech" ]; then - pip install ${DEEPSPEECH_ARTIFACTS_ROOT}/${deepspeech_pkg} | cat - python -c "import tensorflow; from deepspeech import audioToInputVector" - - # Since this build depends on the completion of the whole deepspeech package - # and we might get into funny situation with --config=monolithic, then let's - # be extra-cautious and leverage our dependency against the build to also - # test with libctc_decoder_with_kenlm.so that is packaged for release - download_native_client_files "/tmp/ds" -else - download_ctc_kenlm "/tmp/ds" -fi; +decoder_pkg="ds_ctcdecoder-${whl_ds_version}-cp${pyver_pkg}-cp${pyver_pkg}${py_unicode_type}-${platform}.whl" + +decoder_pkg_url=${DECODER_ARTIFACTS_ROOT}/${decoder_pkg} + +LD_LIBRARY_PATH=${PY37_LDPATH}:$LD_LIBRARY_PATH pip install --verbose --only-binary :all: ${PY37_SOURCE_PACKAGE} --upgrade ${decoder_pkg_url} | cat pushd ${HOME}/DeepSpeech/ds/ time ./bin/run-tc-ldc93s1_new.sh 105 diff --git a/util/config.py b/util/config.py new file mode 100644 index 0000000000..ded9dd6c7e --- /dev/null +++ b/util/config.py @@ -0,0 +1,143 @@ +from __future__ import absolute_import, division, print_function + +import os +import tensorflow as tf + +from attrdict import AttrDict +from six.moves import zip, range, filter +from util.flags import FLAGS +from util.gpu import get_available_gpus +from util.logging import log_error +from util.text import Alphabet +from xdg import BaseDirectory as xdg + +class ConfigSingleton: + _config = None + + def __getattr__(self, name): + if not ConfigSingleton._config: + raise RuntimeError("Global configuration not yet initialized.") + if not hasattr(ConfigSingleton._config, name): + raise RuntimeError("Configuration option {} not found in config.".format(name)) + return ConfigSingleton._config[name] + + +Config = ConfigSingleton() + +def initialize_globals(): + c = AttrDict() + + # ps and worker hosts required for p2p cluster setup + FLAGS.ps_hosts = list(filter(len, FLAGS.ps_hosts.split(','))) + FLAGS.worker_hosts = list(filter(len, FLAGS.worker_hosts.split(','))) + + # Create a cluster from the parameter server and worker hosts. + c.cluster = tf.train.ClusterSpec({'ps': FLAGS.ps_hosts, 'worker': FLAGS.worker_hosts}) + + # The absolute number of computing nodes - regardless of cluster or single mode + num_workers = max(1, len(FLAGS.worker_hosts)) + + # If replica numbers are negative, we multiply their absolute values with the number of workers + if FLAGS.replicas < 0: + FLAGS.replicas = num_workers * -FLAGS.replicas + if FLAGS.replicas_to_agg < 0: + FLAGS.replicas_to_agg = num_workers * -FLAGS.replicas_to_agg + + # The device path base for this node + c.worker_device = '/job:%s/task:%d' % (FLAGS.job_name, FLAGS.task_index) + + # This node's CPU device + c.cpu_device = c.worker_device + '/cpu:0' + + # This node's available GPU devices + c.available_devices = [c.worker_device + gpu for gpu in get_available_gpus()] + + # If there is no GPU available, we fall back to CPU based operation + if 0 == len(c.available_devices): + c.available_devices = [c.cpu_device] + + # Set default dropout rates + if FLAGS.dropout_rate2 < 0: + FLAGS.dropout_rate2 = FLAGS.dropout_rate + if FLAGS.dropout_rate3 < 0: + FLAGS.dropout_rate3 = FLAGS.dropout_rate + if FLAGS.dropout_rate6 < 0: + FLAGS.dropout_rate6 = FLAGS.dropout_rate + + # Set default checkpoint dir + if len(FLAGS.checkpoint_dir) == 0: + FLAGS.checkpoint_dir = xdg.save_data_path(os.path.join('deepspeech','checkpoints')) + + # Set default summary dir + if len(FLAGS.summary_dir) == 0: + FLAGS.summary_dir = xdg.save_data_path(os.path.join('deepspeech','summaries')) + + # Standard session configuration that'll be used for all new sessions. + c.session_config = tf.ConfigProto(allow_soft_placement=True, log_device_placement=FLAGS.log_placement, + inter_op_parallelism_threads=FLAGS.inter_op_parallelism_threads, + intra_op_parallelism_threads=FLAGS.intra_op_parallelism_threads) + + c.alphabet = Alphabet(os.path.abspath(FLAGS.alphabet_config_path)) + + # Geometric Constants + # =================== + + # For an explanation of the meaning of the geometric constants, please refer to + # doc/Geometry.md + + # Number of MFCC features + c.n_input = 26 # TODO: Determine this programmatically from the sample rate + + # The number of frames in the context + c.n_context = 9 # TODO: Determine the optimal value using a validation data set + + # Number of units in hidden layers + c.n_hidden = FLAGS.n_hidden + + c.n_hidden_1 = c.n_hidden + + c.n_hidden_2 = c.n_hidden + + c.n_hidden_5 = c.n_hidden + + # LSTM cell state dimension + c.n_cell_dim = c.n_hidden + + # The number of units in the third layer, which feeds in to the LSTM + c.n_hidden_3 = c.n_cell_dim + + # Units in the sixth layer = number of characters in the target language plus one + c.n_hidden_6 = c.alphabet.size() + 1 # +1 for CTC blank label + + # Queues that are used to gracefully stop parameter servers. + # Each queue stands for one ps. A finishing worker sends a token to each queue before joining/quitting. + # Each ps will dequeue as many tokens as there are workers before joining/quitting. + # This ensures parameter servers won't quit, if still required by at least one worker and + # also won't wait forever (like with a standard `server.join()`). + done_queues = [] + for i, ps in enumerate(FLAGS.ps_hosts): + # Queues are hosted by their respective owners + with tf.device('/job:ps/task:%d' % i): + done_queues.append(tf.FIFOQueue(1, tf.int32, shared_name=('queue%i' % i))) + + # Placeholder to pass in the worker's index as token + c.token_placeholder = tf.placeholder(tf.int32) + + # Enqueue operations for each parameter server + c.done_enqueues = [queue.enqueue(c.token_placeholder) for queue in done_queues] + + # Dequeue operations for each parameter server + c.done_dequeues = [queue.dequeue() for queue in done_queues] + + if len(FLAGS.one_shot_infer) > 0: + FLAGS.train = False + FLAGS.test = False + FLAGS.export_dir = '' + if not os.path.exists(FLAGS.one_shot_infer): + log_error('Path specified in --one_shot_infer is not a valid file.') + exit(1) + + # Determine, if we are the chief worker + c.is_chief = len(FLAGS.worker_hosts) == 0 or (FLAGS.task_index == 0 and FLAGS.job_name == 'worker') + + ConfigSingleton._config = c diff --git a/util/coordinator.py b/util/coordinator.py new file mode 100644 index 0000000000..8f1acc96c7 --- /dev/null +++ b/util/coordinator.py @@ -0,0 +1,568 @@ +from __future__ import absolute_import, division, print_function + +import pickle +import tensorflow as tf + +from datetime import datetime +from six.moves import zip, range, filter, urllib, BaseHTTPServer +from threading import Thread, Lock +from util.config import Config +from util.flags import FLAGS +from util.logging import log_info, log_error, log_debug, log_warn, log_traffic + + +# Execution +# ========= + +# For reporting we also need a standard way to do time measurements. +def stopwatch(start_duration=0): + r''' + This function will toggle a stopwatch. + The first call starts it, second call stops it, third call continues it etc. + So if you want to measure the accumulated time spent in a certain area of the code, + you can surround that code by stopwatch-calls like this: + + .. code:: python + + fun_time = 0 # initializes a stopwatch + [...] + for i in range(10): + [...] + # Starts/continues the stopwatch - fun_time is now a point in time (again) + fun_time = stopwatch(fun_time) + fun() + # Pauses the stopwatch - fun_time is now a duration + fun_time = stopwatch(fun_time) + [...] + # The following line only makes sense after an even call of :code:`fun_time = stopwatch(fun_time)`. + print 'Time spent in fun():', format_duration(fun_time) + + ''' + if start_duration == 0: + return datetime.utcnow() + else: + return datetime.utcnow() - start_duration + +def format_duration(duration): + '''Formats the result of an even stopwatch call as hours:minutes:seconds''' + duration = duration if isinstance(duration, int) else duration.seconds + m, s = divmod(duration, 60) + h, m = divmod(m, 60) + return '%d:%02d:%02d' % (h, m, s) + + +# String constants for different services of the web handler +PREFIX_NEXT_INDEX = '/next_index_' +PREFIX_GET_JOB = '/get_job_' + +# Global ID counter for all objects requiring an ID +id_counter = 0 + +def new_id(): + '''Returns a new ID that is unique on process level. Not thread-safe. + + Returns: + int. The new ID + ''' + global id_counter + id_counter += 1 + return id_counter + +class WorkerJob(object): + '''Represents a job that should be executed by a worker. + + Args: + epoch_id (int): the ID of the 'parent' epoch + index (int): the epoch index of the 'parent' epoch + set_name (str): the name of the data-set - one of 'train', 'dev' + steps (int): the number of `session.run` calls + ''' + def __init__(self, epoch_id, index, set_name, steps): + self.id = new_id() + self.epoch_id = epoch_id + self.index = index + self.worker = -1 + self.set_name = set_name + self.steps = steps + self.loss = -1 + self.samples = [] + + def __str__(self): + return 'Job (ID: %d, worker: %d, epoch: %d, set_name: %s)' % (self.id, self.worker, self.index, self.set_name) + +class Epoch(object): + '''Represents an epoch that should be executed by the Training Coordinator. + Creates `num_jobs` `WorkerJob` instances in state 'open'. + + Args: + index (int): the epoch index of the 'parent' epoch + num_jobs (int): the number of jobs in this epoch + + Kwargs: + set_name (str): the name of the data-set - one of 'train', 'dev' + ''' + def __init__(self, coord, index, num_jobs, set_name='train'): + self.id = new_id() + self.coord = coord + self.index = index + self.num_jobs = num_jobs + self.set_name = set_name + self.loss = -1 + self.jobs_open = [] + self.jobs_running = [] + self.jobs_done = [] + for i in range(self.num_jobs): + self.jobs_open.append(WorkerJob(self.id, self.index, self.set_name, FLAGS.iters_per_worker)) + + def name(self): + '''Gets a printable name for this epoch. + + Returns: + str. printable name for this epoch + ''' + if self.index >= 0: + ename = ' of Epoch %d' % self.index + else: + ename = '' + if self.set_name == 'train': + return 'Training%s' % ename + else: + return 'Validation%s' % ename + + def get_job(self, worker): + '''Gets the next open job from this epoch. The job will be marked as 'running'. + + Args: + worker (int): index of the worker that takes the job + + Returns: + WorkerJob. job that has been marked as running for this worker + ''' + if len(self.jobs_open) > 0: + job = self.jobs_open.pop(0) + self.jobs_running.append(job) + job.worker = worker + return job + else: + return None + + def finish_job(self, job): + '''Finishes a running job. Removes it from the running jobs list and adds it to the done jobs list. + + Args: + job (WorkerJob): the job to put into state 'done' + ''' + index = next((i for i in range(len(self.jobs_running)) if self.jobs_running[i].id == job.id), -1) + if index >= 0: + self.jobs_running.pop(index) + self.jobs_done.append(job) + log_traffic('%s - Moved %s from running to done.' % (self.name(), job)) + else: + log_warn('%s - There is no job with ID %d registered as running.' % (self.name(), job.id)) + + def done(self): + '''Checks, if all jobs of the epoch are in state 'done'. + + Returns: + bool. if all jobs of the epoch are 'done' + ''' + if len(self.jobs_open) == 0 and len(self.jobs_running) == 0: + num_jobs = len(self.jobs_done) + if num_jobs > 0: + jobs = self.jobs_done + self.jobs_done = [] + if not self.num_jobs == num_jobs: + log_warn('%s - Number of steps not equal to number of jobs done.' % (self.name())) + + agg_loss = 0.0 + + for i in range(num_jobs): + job = jobs.pop(0) + agg_loss += job.loss + + self.loss = agg_loss / num_jobs + + # if the job was for validation dataset then append it to the COORD's _loss for early stop verification + if (FLAGS.early_stop is True) and (self.set_name == 'dev'): + self.coord._dev_losses.append(self.loss) + + return True + return False + + def job_status(self): + '''Provides a printable overview of the states of the jobs of this epoch. + + Returns: + str. printable overall job state + ''' + return '%s - jobs open: %d, jobs running: %d, jobs done: %d' % (self.name(), len(self.jobs_open), len(self.jobs_running), len(self.jobs_done)) + + def __str__(self): + if not self.done(): + return self.job_status() + + return '%s - loss: %f' % (self.name(), self.loss) + + +class TrainingCoordinator(object): + ''' Central training coordination class. + Used for distributing jobs among workers of a cluster. + Instantiated on all workers, calls of non-chief workers will transparently + HTTP-forwarded to the chief worker instance. + ''' + + def make_handler(coord): + class TrainingCoordinationHandler(BaseHTTPServer.BaseHTTPRequestHandler): + '''Handles HTTP requests from remote workers to the Training Coordinator. + ''' + def _send_answer(self, data=None): + self.send_response(200) + self.send_header('content-type', 'text/plain') + self.end_headers() + if data: + self.wfile.write(data) + + def do_GET(self): + if coord.started: + if self.path.startswith(PREFIX_NEXT_INDEX): + index = coord.get_next_index(self.path[len(PREFIX_NEXT_INDEX):]) + if index >= 0: + self._send_answer(str(index).encode("utf-8")) + return + elif self.path.startswith(PREFIX_GET_JOB): + job = coord.get_job(worker=int(self.path[len(PREFIX_GET_JOB):])) + if job: + self._send_answer(pickle.dumps(job)) + return + self.send_response(204) # end of training + else: + self.send_response(202) # not ready yet + self.end_headers() + + def do_POST(self): + if coord.started: + src = self.rfile.read(int(self.headers['content-length'])) + job = coord.next_job(pickle.loads(src)) + if job: + self._send_answer(pickle.dumps(job)) + return + self.send_response(204) # end of training + else: + self.send_response(202) # not ready yet + self.end_headers() + + def log_message(self, format, *args): + '''Overriding base method to suppress web handler messages on stdout. + ''' + return + + return TrainingCoordinationHandler + + def __init__(self, is_chief): + self._init() + self._lock = Lock() + self._thread = None + self.started = False + self.is_chief = is_chief + if is_chief: + self._httpd = BaseHTTPServer.HTTPServer((FLAGS.coord_host, FLAGS.coord_port), TrainingCoordinator.make_handler(self)) + + def _reset_counters(self): + self._index_train = 0 + self._index_dev = 0 + + def _init(self): + self._epochs_running = [] + self._epochs_done = [] + self._reset_counters() + self._dev_losses = [] + + def _log_all_jobs(self): + '''Use this to debug-print epoch state''' + log_debug('Epochs - running: %d, done: %d' % (len(self._epochs_running), len(self._epochs_done))) + for epoch in self._epochs_running: + log_debug(' - running: ' + epoch.job_status()) + + def start_coordination(self, model_feeder, step=0): + '''Starts to coordinate epochs and jobs among workers on base of + data-set sizes, the (global) step and FLAGS parameters. + + Args: + model_feeder (ModelFeeder): data-sets to be used for coordinated training + + Kwargs: + step (int): global step of a loaded model to determine starting point + ''' + with self._lock: + self._init() + + # Number of GPUs per worker - fixed for now by local reality or cluster setup + gpus_per_worker = len(Config.available_devices) + + # Number of batches processed per job per worker + batches_per_job = gpus_per_worker * max(1, FLAGS.iters_per_worker) + + # Number of batches per global step + batches_per_step = gpus_per_worker * max(1, FLAGS.replicas_to_agg) + + # Number of global steps per epoch - to be at least 1 + steps_per_epoch = max(1, model_feeder.train.total_batches // batches_per_step) + + # The start epoch of our training + self._epoch = step // steps_per_epoch + + # Number of additional 'jobs' trained already 'on top of' our start epoch + jobs_trained = (step % steps_per_epoch) * batches_per_step // batches_per_job + + # Total number of train/dev jobs covering their respective whole sets (one epoch) + self._num_jobs_train = max(1, model_feeder.train.total_batches // batches_per_job) + self._num_jobs_dev = max(1, model_feeder.dev.total_batches // batches_per_job) + + if FLAGS.epoch < 0: + # A negative epoch means to add its absolute number to the epochs already computed + self._target_epoch = self._epoch + abs(FLAGS.epoch) + else: + self._target_epoch = FLAGS.epoch + + # State variables + # We only have to train, if we are told so and are not at the target epoch yet + self._train = FLAGS.train and self._target_epoch > self._epoch + + if self._train: + # The total number of jobs for all additional epochs to be trained + # Will be decremented for each job that is produced/put into state 'open' + self._num_jobs_train_left = (self._target_epoch - self._epoch) * self._num_jobs_train - jobs_trained + log_info('STARTING Optimization') + self._training_time = stopwatch() + + # Important for debugging + log_debug('step: %d' % step) + log_debug('epoch: %d' % self._epoch) + log_debug('target epoch: %d' % self._target_epoch) + log_debug('steps per epoch: %d' % steps_per_epoch) + log_debug('number of batches in train set: %d' % model_feeder.train.total_batches) + log_debug('batches per job: %d' % batches_per_job) + log_debug('batches per step: %d' % batches_per_step) + log_debug('number of jobs in train set: %d' % self._num_jobs_train) + log_debug('number of jobs already trained in first epoch: %d' % jobs_trained) + + self._next_epoch() + + # The coordinator is ready to serve + self.started = True + + def _next_epoch(self): + # State-machine of the coordination process + + # Indicates, if there were 'new' epoch(s) provided + result = False + + # Make sure that early stop is enabled and validation part is enabled + if (FLAGS.early_stop is True) and (FLAGS.validation_step > 0) and (len(self._dev_losses) >= FLAGS.earlystop_nsteps): + + # Calculate the mean of losses for past epochs + mean_loss = np.mean(self._dev_losses[-FLAGS.earlystop_nsteps:-1]) + # Calculate the standard deviation for losses from validation part in the past epochs + std_loss = np.std(self._dev_losses[-FLAGS.earlystop_nsteps:-1]) + # Update the list of losses incurred + self._dev_losses = self._dev_losses[-FLAGS.earlystop_nsteps:] + log_debug('Checking for early stopping (last %d steps) validation loss: %f, with standard deviation: %f and mean: %f' % (FLAGS.earlystop_nsteps, self._dev_losses[-1], std_loss, mean_loss)) + + # Check if validation loss has started increasing or is not decreasing substantially, making sure slight fluctuations don't bother the early stopping from working + if self._dev_losses[-1] > np.max(self._dev_losses[:-1]) or (abs(self._dev_losses[-1] - mean_loss) < FLAGS.estop_mean_thresh and std_loss < FLAGS.estop_std_thresh): + # Time to early stop + log_info('Early stop triggered as (for last %d steps) validation loss: %f with standard deviation: %f and mean: %f' % (FLAGS.earlystop_nsteps, self._dev_losses[-1], std_loss, mean_loss)) + self._dev_losses = [] + self._end_training() + self._train = False + + if self._train: + # We are in train mode + if self._num_jobs_train_left > 0: + # There are still jobs left + num_jobs_train = min(self._num_jobs_train_left, self._num_jobs_train) + self._num_jobs_train_left -= num_jobs_train + + # Let's try our best to keep the notion of curriculum learning + self._reset_counters() + + # Append the training epoch + self._epochs_running.append(Epoch(self, self._epoch, num_jobs_train, set_name='train')) + + if FLAGS.validation_step > 0 and (FLAGS.validation_step == 1 or self._epoch > 0) and self._epoch % FLAGS.validation_step == 0: + # The current epoch should also have a validation part + self._epochs_running.append(Epoch(self._epoch, self._num_jobs_dev, set_name='dev')) + + + # Indicating that there were 'new' epoch(s) provided + result = True + else: + # No jobs left, but still in train mode: concluding training + self._end_training() + self._train = False + + if result: + # Increment the epoch index + self._epoch += 1 + return result + + def _end_training(self): + self._training_time = stopwatch(self._training_time) + log_info('FINISHED Optimization - training time: %s' % format_duration(self._training_time)) + + def start(self): + '''Starts Training Coordinator. If chief, it starts a web server for + communication with non-chief instances. + ''' + if self.is_chief: + log_debug('Starting coordinator...') + self._thread = Thread(target=self._httpd.serve_forever) + self._thread.daemon = True + self._thread.start() + log_debug('Coordinator started. Thread id {}'.format(self._thread.ident)) + + def stop(self, wait_for_running_epochs=True): + '''Stops Training Coordinator. If chief, it waits for all epochs to be + 'done' and then shuts down the web server. + ''' + if self.is_chief and self._thread: + if wait_for_running_epochs: + while len(self._epochs_running) > 0: + log_traffic('Coordinator is waiting for epochs to finish...') + time.sleep(5) + log_debug('Stopping coordinator...') + self._httpd.shutdown() + log_debug('Coordinator stopped.') + + def _talk_to_chief(self, path, data=None, default=None): + tries = 0 + while tries < FLAGS.coord_retries: + tries += 1 + try: + url = 'http://%s:%d%s' % (FLAGS.coord_host, FLAGS.coord_port, path) + log_traffic('Contacting coordinator - url: %s, tries: %d ...' % (url, tries-1)) + res = urllib.request.urlopen(urllib.request.Request(url, data, { 'content-type': 'text/plain' })) + str = res.read() + status = res.getcode() + log_traffic('Coordinator responded - url: %s, status: %s' % (url, status)) + if status == 200: + return str + if status == 204: # We use 204 (no content) to indicate end of training + return default + except urllib.error.HTTPError as error: + log_traffic('Problem reaching coordinator - url: %s, HTTP code: %d' % (url, error.code)) + pass + time.sleep(10) + return default + + def get_next_index(self, set_name): + '''Retrives a new cluster-unique batch index for a given set-name. + Prevents applying one batch multiple times per epoch. + + Args: + set_name (str): name of the data set - one of 'train', 'dev' + + Returns: + int. new data set index + ''' + with self._lock: + if self.is_chief: + member = '_index_' + set_name + value = getattr(self, member, -1) + setattr(self, member, value + 1) + return value + else: + # We are a remote worker and have to hand over to the chief worker by HTTP + log_traffic('Asking for next index...') + value = int(self._talk_to_chief(PREFIX_NEXT_INDEX + set_name)) + log_traffic('Got index %d.' % value) + return value + + def _get_job(self, worker=0): + job = None + # Find first running epoch that provides a next job + for epoch in self._epochs_running: + job = epoch.get_job(worker) + if job: + return job + # No next job found + return None + + def get_job(self, worker=0): + '''Retrieves the first job for a worker. + + Kwargs: + worker (int): index of the worker to get the first job for + + Returns: + WorkerJob. a job of one of the running epochs that will get + associated with the given worker and put into state 'running' + ''' + # Let's ensure that this does not interfere with other workers/requests + with self._lock: + if self.is_chief: + # First try to get a next job + job = self._get_job(worker) + + if job is None: + # If there was no next job, we give it a second chance by triggering the epoch state machine + if self._next_epoch(): + # Epoch state machine got a new epoch + # Second try to get a next job + job = self._get_job(worker) + if job is None: + # Albeit the epoch state machine got a new epoch, the epoch had no new job for us + log_error('Unexpected case - no job for worker %d.' % (worker)) + return job + + # Epoch state machine has no new epoch + # This happens at the end of the whole training - nothing to worry about + log_traffic('No jobs left for worker %d.' % (worker)) + self._log_all_jobs() + return None + + # We got a new job from one of the currently running epochs + log_traffic('Got new %s' % job) + return job + + # We are a remote worker and have to hand over to the chief worker by HTTP + result = self._talk_to_chief(PREFIX_GET_JOB + str(FLAGS.task_index)) + if result: + result = pickle.loads(result) + return result + + def next_job(self, job): + '''Sends a finished job back to the coordinator and retrieves in exchange the next one. + + Kwargs: + job (WorkerJob): job that was finished by a worker and who's results are to be + digested by the coordinator + + Returns: + WorkerJob. next job of one of the running epochs that will get + associated with the worker from the finished job and put into state 'running' + ''' + if self.is_chief: + # Try to find the epoch the job belongs to + epoch = next((epoch for epoch in self._epochs_running if epoch.id == job.epoch_id), None) + if epoch: + # We are going to manipulate things - let's avoid undefined state + with self._lock: + # Let the epoch finish the job + epoch.finish_job(job) + # Check, if epoch is done now + if epoch.done(): + # If it declares itself done, move it from 'running' to 'done' collection + self._epochs_running.remove(epoch) + self._epochs_done.append(epoch) + log_info('%s' % epoch) + else: + # There was no running epoch found for this job - this should never happen. + log_error('There is no running epoch of ID %d for job with ID %d. This should never happen.' % (job.epoch_id, job.id)) + return self.get_job(job.worker) + + # We are a remote worker and have to hand over to the chief worker by HTTP + result = self._talk_to_chief('', data=pickle.dumps(job)) + if result: + result = pickle.loads(result) + return result diff --git a/util/feeding.py b/util/feeding.py index 65b90a2653..26851bb771 100644 --- a/util/feeding.py +++ b/util/feeding.py @@ -12,14 +12,13 @@ class ModelFeeder(object): ''' Feeds data into a model. Feeding is parallelized by independent units called tower feeders (usually one per GPU). - Each tower feeder provides data from three runtime switchable sources (train, dev, test). - These sources are to be provided by three DataSet instances whos references are kept. + Each tower feeder provides data from runtime switchable sources (train, dev). + These sources are to be provided by the DataSet instances whose references are kept. Creates, owns and delegates to tower_feeder_count internal tower feeder objects. ''' def __init__(self, train_set, dev_set, - test_set, numcep, numcontext, alphabet, @@ -28,8 +27,7 @@ def __init__(self, self.train = train_set self.dev = dev_set - self.test = test_set - self.sets = [train_set, dev_set, test_set] + self.sets = [train_set, dev_set] self.numcep = numcep self.numcontext = numcontext self.tower_feeder_count = max(len(get_available_gpus()), 1) if tower_feeder_count < 0 else tower_feeder_count diff --git a/util/flags.py b/util/flags.py new file mode 100644 index 0000000000..34456b9741 --- /dev/null +++ b/util/flags.py @@ -0,0 +1,140 @@ +from __future__ import absolute_import, division, print_function + +import tensorflow as tf + + +FLAGS = tf.app.flags.FLAGS + + +def create_flags(): + # Importer + # ======== + + tf.app.flags.DEFINE_string ('train_files', '', 'comma separated list of files specifying the dataset used for training. multiple files will get merged') + tf.app.flags.DEFINE_string ('dev_files', '', 'comma separated list of files specifying the dataset used for validation. multiple files will get merged') + tf.app.flags.DEFINE_string ('test_files', '', 'comma separated list of files specifying the dataset used for testing. multiple files will get merged') + tf.app.flags.DEFINE_boolean ('fulltrace', False, 'if full trace debug info should be generated during training') + + tf.app.flags.DEFINE_string ('train_cached_features_path', '', 'comma separated list of files specifying the dataset used for training. multiple files will get merged') + tf.app.flags.DEFINE_string ('dev_cached_features_path', '', 'comma separated list of files specifying the dataset used for validation. multiple files will get merged') + tf.app.flags.DEFINE_string ('test_cached_features_path', '', 'comma separated list of files specifying the dataset used for testing. multiple files will get merged') + + # Cluster configuration + # ===================== + + tf.app.flags.DEFINE_string ('ps_hosts', '', 'parameter servers - comma separated list of hostname:port pairs') + tf.app.flags.DEFINE_string ('worker_hosts', '', 'workers - comma separated list of hostname:port pairs') + tf.app.flags.DEFINE_string ('job_name', 'localhost', 'job name - one of localhost (default), worker, ps') + tf.app.flags.DEFINE_integer ('task_index', 0, 'index of task within the job - worker with index 0 will be the chief') + tf.app.flags.DEFINE_integer ('replicas', -1, 'total number of replicas - if negative, its absolute value is multiplied by the number of workers') + tf.app.flags.DEFINE_integer ('replicas_to_agg', -1, 'number of replicas to aggregate - if negative, its absolute value is multiplied by the number of workers') + tf.app.flags.DEFINE_integer ('coord_retries', 100, 'number of tries of workers connecting to training coordinator before failing') + tf.app.flags.DEFINE_string ('coord_host', 'localhost', 'coordination server host') + tf.app.flags.DEFINE_integer ('coord_port', 2500, 'coordination server port') + tf.app.flags.DEFINE_integer ('iters_per_worker', 1, 'number of train or inference iterations per worker before results are sent back to coordinator') + + # Global Constants + # ================ + + tf.app.flags.DEFINE_boolean ('train', True, 'whether to train the network') + tf.app.flags.DEFINE_boolean ('test', True, 'whether to test the network') + tf.app.flags.DEFINE_integer ('epoch', 75, 'target epoch to train - if negative, the absolute number of additional epochs will be trained') + + tf.app.flags.DEFINE_float ('dropout_rate', 0.05, 'dropout rate for feedforward layers') + tf.app.flags.DEFINE_float ('dropout_rate2', -1.0, 'dropout rate for layer 2 - defaults to dropout_rate') + tf.app.flags.DEFINE_float ('dropout_rate3', -1.0, 'dropout rate for layer 3 - defaults to dropout_rate') + tf.app.flags.DEFINE_float ('dropout_rate4', 0.0, 'dropout rate for layer 4 - defaults to 0.0') + tf.app.flags.DEFINE_float ('dropout_rate5', 0.0, 'dropout rate for layer 5 - defaults to 0.0') + tf.app.flags.DEFINE_float ('dropout_rate6', -1.0, 'dropout rate for layer 6 - defaults to dropout_rate') + + tf.app.flags.DEFINE_float ('relu_clip', 20.0, 'ReLU clipping value for non-recurrant layers') + + # Adam optimizer (http://arxiv.org/abs/1412.6980) parameters + + tf.app.flags.DEFINE_float ('beta1', 0.9, 'beta 1 parameter of Adam optimizer') + tf.app.flags.DEFINE_float ('beta2', 0.999, 'beta 2 parameter of Adam optimizer') + tf.app.flags.DEFINE_float ('epsilon', 1e-8, 'epsilon parameter of Adam optimizer') + tf.app.flags.DEFINE_float ('learning_rate', 0.001, 'learning rate of Adam optimizer') + + # Batch sizes + + tf.app.flags.DEFINE_integer ('train_batch_size', 1, 'number of elements in a training batch') + tf.app.flags.DEFINE_integer ('dev_batch_size', 1, 'number of elements in a validation batch') + tf.app.flags.DEFINE_integer ('test_batch_size', 1, 'number of elements in a test batch') + + tf.app.flags.DEFINE_integer ('export_batch_size', 1, 'number of elements per batch on the exported graph') + + # Performance (UNSUPPORTED) + tf.app.flags.DEFINE_integer ('inter_op_parallelism_threads', 0, 'number of inter-op parallelism threads - see tf.ConfigProto for more details') + tf.app.flags.DEFINE_integer ('intra_op_parallelism_threads', 0, 'number of intra-op parallelism threads - see tf.ConfigProto for more details') + + # Sample limits + + tf.app.flags.DEFINE_integer ('limit_train', 0, 'maximum number of elements to use from train set - 0 means no limit') + tf.app.flags.DEFINE_integer ('limit_dev', 0, 'maximum number of elements to use from validation set- 0 means no limit') + tf.app.flags.DEFINE_integer ('limit_test', 0, 'maximum number of elements to use from test set- 0 means no limit') + + # Step widths + + tf.app.flags.DEFINE_integer ('validation_step', 0, 'number of epochs we cycle through before validating the model - 0 means no validation steps') + + # Checkpointing + + tf.app.flags.DEFINE_string ('checkpoint_dir', '', 'directory in which checkpoints are stored - defaults to directory "deepspeech/checkpoints" within user\'s data home specified by the XDG Base Directory Specification') + tf.app.flags.DEFINE_integer ('checkpoint_secs', 600, 'checkpoint saving interval in seconds') + tf.app.flags.DEFINE_integer ('max_to_keep', 5, 'number of checkpoint files to keep - default value is 5') + + # Exporting + + tf.app.flags.DEFINE_string ('export_dir', '', 'directory in which exported models are stored - if omitted, the model won\'t get exported') + tf.app.flags.DEFINE_integer ('export_version', 1, 'version number of the exported model') + tf.app.flags.DEFINE_boolean ('remove_export', False, 'whether to remove old exported models') + tf.app.flags.DEFINE_boolean ('export_tflite', False, 'export a graph ready for TF Lite engine') + tf.app.flags.DEFINE_boolean ('use_seq_length', True, 'have sequence_length in the exported graph (will make tfcompile unhappy)') + tf.app.flags.DEFINE_integer ('n_steps', 16, 'how many timesteps to process at once by the export graph, higher values mean more latency') + + # Reporting + + tf.app.flags.DEFINE_integer ('log_level', 1, 'log level for console logs - 0: INFO, 1: WARN, 2: ERROR, 3: FATAL') + tf.app.flags.DEFINE_boolean ('log_traffic', False, 'log cluster transaction and traffic information during debug logging') + tf.app.flags.DEFINE_boolean ('show_progressbar', True, 'Show progress for training, validation and testing processes. Log level should be > 0.') + + tf.app.flags.DEFINE_boolean ('log_placement', False, 'whether to log device placement of the operators to the console') + tf.app.flags.DEFINE_integer ('report_count', 10, 'number of phrases with lowest WER (best matching) to print out during a WER report') + + tf.app.flags.DEFINE_string ('summary_dir', '', 'target directory for TensorBoard summaries - defaults to directory "deepspeech/summaries" within user\'s data home specified by the XDG Base Directory Specification') + tf.app.flags.DEFINE_integer ('summary_secs', 0, 'interval in seconds for saving TensorBoard summaries - if 0, no summaries will be written') + + # Geometry + + tf.app.flags.DEFINE_integer ('n_hidden', 2048, 'layer width to use when initialising layers') + + # Initialization + + tf.app.flags.DEFINE_integer ('random_seed', 4567, 'default random seed that is used to initialize variables') + + # Early Stopping + + tf.app.flags.DEFINE_boolean ('early_stop', True, 'enable early stopping mechanism over validation dataset. Make sure that dev FLAG is enabled for this to work') + + # This parameter is irrespective of the time taken by single epoch to complete and checkpoint saving intervals. + # It is possible that early stopping is triggered far after the best checkpoint is already replaced by checkpoint saving interval mechanism. + # One has to align the parameters (earlystop_nsteps, checkpoint_secs) accordingly as per the time taken by an epoch on different datasets. + + tf.app.flags.DEFINE_integer ('earlystop_nsteps', 4, 'number of steps to consider for early stopping. Loss is not stored in the checkpoint so when checkpoint is revived it starts the loss calculation from start at that point') + tf.app.flags.DEFINE_float ('estop_mean_thresh', 0.5, 'mean threshold for loss to determine the condition if early stopping is required') + tf.app.flags.DEFINE_float ('estop_std_thresh', 0.5, 'standard deviation threshold for loss to determine the condition if early stopping is required') + + # Decoder + + tf.app.flags.DEFINE_string ('alphabet_config_path', 'data/alphabet.txt', 'path to the configuration file specifying the alphabet used by the network. See the comment in data/alphabet.txt for a description of the format.') + tf.app.flags.DEFINE_string ('lm_binary_path', 'data/lm/lm.binary', 'path to the language model binary file created with KenLM') + tf.app.flags.DEFINE_string ('lm_trie_path', 'data/lm/trie', 'path to the language model trie file created with native_client/generate_trie') + tf.app.flags.DEFINE_integer ('beam_width', 1024, 'beam width used in the CTC decoder when building candidate transcriptions') + tf.app.flags.DEFINE_float ('lm_alpha', 1.50, 'the alpha hyperparameter of the CTC decoder. Language Model weight.') + tf.app.flags.DEFINE_float ('lm_beta', 2.10, 'the beta hyperparameter of the CTC decoder. Word insertion weight.') + + # Inference mode + + tf.app.flags.DEFINE_string ('one_shot_infer', '', 'one-shot inference mode: specify a wav file and the script will load the checkpoint and perform inference on it. Disables training, testing and exporting.') + diff --git a/util/logging.py b/util/logging.py new file mode 100644 index 0000000000..1506062664 --- /dev/null +++ b/util/logging.py @@ -0,0 +1,35 @@ +from __future__ import print_function + +from util.flags import FLAGS + + +# Logging functions +# ================= + +def prefix_print(prefix, message): + print(prefix + ('\n' + prefix).join(message.split('\n'))) + + +def log_debug(message): + if FLAGS.log_level == 0: + prefix_print('D ', message) + + +def log_traffic(message): + if FLAGS.log_traffic: + log_debug(message) + + +def log_info(message): + if FLAGS.log_level <= 1: + prefix_print('I ', message) + + +def log_warn(message): + if FLAGS.log_level <= 2: + prefix_print('W ', message) + + +def log_error(message): + if FLAGS.log_level <= 3: + prefix_print('E ', message) \ No newline at end of file diff --git a/util/shared_lib.py b/util/shared_lib.py deleted file mode 100644 index 011109bd4e..0000000000 --- a/util/shared_lib.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import print_function -from __future__ import absolute_import -from util.gpu import get_available_gpus -from ctypes import cdll -from sys import platform as _platform - -def get_cupti_libname(): - if _platform == 'linux' or _platform == 'linux2': - return 'libcupti.so' - elif _platform == 'darwin': - return 'libcupti.dylib' - elif _platform == 'win32': - return 'libcupti.dll' - -def check_cupti(): - # We want to ensure that user has properly configured its libs. - # We do this because dso load of libcupti will happen after a lot - # of computation happened, so easy to miss and loose time. - libname = get_cupti_libname() - cupti = check_so(libname) - if cupti is None: - print("INFO: No %s because no GPU, go ahead." % libname) - elif cupti is True: - print("INFO: Found %s." % libname) - else: - print("WARNING: Running on GPU but no %s could be found ; will be unable to report GPU VRAM usage." % libname) - -def check_so(soname): - """ - Verify that we do have the 'soname' lib present in the system, and that it - can be loaded. - """ - - if len(get_available_gpus()) == 0: - return None - - # Try to force load lib, this would fail if the lib is not there :) - try: - lib = cdll.LoadLibrary(soname) - print("INFO: Found so as", lib) - assert lib.__class__.__name__ == 'CDLL' - assert lib._name == soname - return True - except OSError as ex: - print("WARNING:", ex) - return False diff --git a/util/taskcluster.py b/util/taskcluster.py index 360b011779..4b6929d7cf 100644 --- a/util/taskcluster.py +++ b/util/taskcluster.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import, division +import platform import subprocess import sys import os @@ -9,6 +10,9 @@ import stat import six.moves.urllib as urllib +from pkg_resources import parse_version + + DEFAULT_SCHEMES = { 'deepspeech': 'https://index.taskcluster.net/v1/task/project.deepspeech.deepspeech.native_client.%(branch_name)s.%(arch_string)s/artifacts/public/%(artifact_name)s', 'tensorflow': 'https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.%(branch_name)s.%(arch_string)s/artifacts/public/%(artifact_name)s' @@ -16,7 +20,7 @@ TASKCLUSTER_SCHEME = os.getenv('TASKCLUSTER_SCHEME', DEFAULT_SCHEMES['deepspeech']) -def get_tc_url(arch_string=None, artifact_name='native_client.tar.xz', branch_name='master'): +def get_tc_url(arch_string, artifact_name='native_client.tar.xz', branch_name='master'): assert arch_string is not None assert artifact_name is not None assert len(artifact_name) > 0 @@ -59,14 +63,17 @@ def maybe_download_tc_bin(**kwargs): final_stat = os.stat(final_file) os.chmod(final_file, final_stat.st_mode | stat.S_IEXEC) +def read(fname): + return open(os.path.join(os.path.dirname(__file__), fname)).read() + if __name__ == '__main__': import argparse parser = argparse.ArgumentParser(description='Tooling to ease downloading of components from TaskCluster.') - parser.add_argument('--target', required=True, + parser.add_argument('--target', required=False, help='Where to put the native client binary files') - parser.add_argument('--arch', required=False, default='cpu', - help='Which architecture to download binaries for. "arm" for ARM 7 (32-bit), "gpu" for CUDA enabled x86_64 binaries, "cpu" for CPU-only x86_64 binaries, "osx" for CPU-only x86_64 OSX binaries. Optional ("cpu" by default)') + parser.add_argument('--arch', required=False, + help='Which architecture to download binaries for. "arm" for ARM 7 (32-bit), "arm64" for ARM64, "gpu" for CUDA enabled x86_64 binaries, "cpu" for CPU-only x86_64 binaries, "osx" for CPU-only x86_64 OSX binaries. Optional ("cpu" by default)') parser.add_argument('--artifact', required=False, default='native_client.tar.xz', help='Name of the artifact to download. Defaults to "native_client.tar.xz"') @@ -74,9 +81,54 @@ def maybe_download_tc_bin(**kwargs): help='Name of the TaskCluster scheme to use.') parser.add_argument('--branch', required=False, default='master', help='Branch name to use. Defaulting to "master".') + parser.add_argument('--decoder', action='store_true', + help='Get URL to ds_ctcdecoder Python package.') args = parser.parse_args() + if not args.target and not args.decoder: + print('Pass either --target or --decoder.') + exit(1) + + is_arm = 'arm' in platform.machine() + is_mac = 'darwin' in sys.platform + is_64bit = sys.maxsize > (2**31 - 1) + is_ucs2 = sys.maxunicode < 0x10ffff + + if not args.arch: + if is_arm: + args.arch = 'arm64' if is_64bit else 'arm' + elif is_mac: + args.arch = 'osx' + else: + args.arch = 'cpu' + + if args.decoder: + plat = platform.system().lower() + arch = platform.machine() + + if plat == 'linux' and arch == 'x86_64': + plat = 'manylinux1' + + if plat == 'darwin': + plat = 'macosx_10_10' + + ds_version = parse_version(read('../VERSION')) + + m_or_mu = 'mu' if is_ucs2 else 'm' + pyver = ''.join(map(str, sys.version_info[0:2])) + + artifact = "ds_ctcdecoder-{ds_version}-cp{pyver}-cp{pyver}{m_or_mu}-{platform}_{arch}.whl".format( + ds_version=ds_version, + pyver=pyver, + m_or_mu=m_or_mu, + platform=plat, + arch=arch + ) + + print(get_tc_url(args.arch, artifact, args.branch)) + exit(0) + if args.source is not None: if args.source in DEFAULT_SCHEMES: TASKCLUSTER_SCHEME = DEFAULT_SCHEMES[args.source]