<commit_before>require 'mkmf'

PLATFORM = `uname`.strip.upcase
SHARED_FLAGS = "-DPLATFORM_#{PLATFORM} --std=c99 -Wall -Wextra -Werror"

case PLATFORM
when 'LINUX'
  SHARED_FLAGS += ' -D_XOPEN_SOURCE=500' # for ftruncate to be present
end

# production
$CFLAGS += " #{SHARED_FLAGS} -O3 -fno-fast-math"

# development
# $CFLAGS += " #{SHARED_FLAGS} -O0 -g"

create_makefile('blurrily/map_ext')<commit_msg>Enables big file support on 32bit Linux<commit_after>require 'mkmf'

PLATFORM = `uname`.strip.upcase
SHARED_FLAGS = "-DPLATFORM_#{PLATFORM} --std=c99 -Wall -Wextra -Werror"

case PLATFORM
when 'LINUX'
  # make sure ftruncate is available
  SHARED_FLAGS << ' -D_XOPEN_SOURCE=700'
  SHARED_FLAGS << ' -D_GNU_SOURCE=1'
  # make sure off_t is 64 bit long
  SHARED_FLAGS << ' -D_FILE_OFFSET_BITS=64'
end

# production
$CFLAGS += " #{SHARED_FLAGS} -O3 -fno-fast-math"

# development
# $CFLAGS += " #{SHARED_FLAGS} -O0 -g"

create_makefile('blurrily/map_ext')
{'fraction_non_alphanumeric': 0.14345549738219895, 'fraction_numerical': 0.02198952879581152, 'mean_word_length': 4.724550898203593, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1322968', 'n_tokens_mistral': 413, 'n_tokens_neox': 400, 'n_words': 82}