<commit_before>#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include "dupin.h"

#include "log.h"
#include "httpd.h"
#include "configure.h"
#include "map.h"

#include <stdlib.h>

#ifdef G_OS_UNIX
#  include <sys/types.h>
#  include <unistd.h>
#  include <stdlib.h>
#  include <grp.h>
#  include <pwd.h>
#  include <signal.h>
#  include <sys/wait.h>
#endif

#ifdef G_OS_UNIX
static gboolean pid_check (DSGlobal * data, GError ** error);
static gboolean pid_check_write (DSGlobal * data, GError ** error);
static void pid_check_close (DSGlobal * data);
static gboolean permission (DSGlobal * data, GError ** error);
#endif

int
main (int argc, char **argv)
{
  GError *error = NULL;
  DSGlobal *data;

  // better make double-sure glib itself is initialized properly.
  if (!g_thread_supported ())
	g_thread_init (NULL);
  g_type_init();<commit_msg>Added more checking on signal.h headers/fix for Darwin - not 100% is needed still in snow leopard<commit_after>#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include "dupin.h"

#include "log.h"
#include "httpd.h"
#include "configure.h"
#include "map.h"

#include <stdlib.h>

#ifdef G_OS_UNIX
#  include <sys/types.h>
#  include <unistd.h>
#  include <stdlib.h>
#  include <grp.h>
#  include <pwd.h>
#  include <signal.h>
#  include <sys/wait.h>
#endif

#ifdef G_OS_UNIX
static gboolean pid_check (DSGlobal * data, GError ** error);
static gboolean pid_check_write (DSGlobal * data, GError ** error);
static void pid_check_close (DSGlobal * data);
static gboolean permission (DSGlobal * data, GError ** error);
#endif

#if defined(DARWIN) && !defined(__cplusplus) && !defined(_ANSI_SOURCE)
/* work around Darwin header file bugs
 *   http://www.opensource.apple.com/bugs/X/BSD%20Kernel/2657228.html
 */
#undef SIG_DFL
#undef SIG_IGN
#undef SIG_ERR
#define SIG_DFL (void (*)(int))0
#define SIG_IGN (void (*)(int))1
#define SIG_ERR (void (*)(int))-1
#endif

int
main (int argc, char **argv)
{
  GError *error = NULL;
  DSGlobal *data;

  // better make double-sure glib itself is initialized properly.
  if (!g_thread_supported ())
	g_thread_init (NULL);
  g_type_init();
{'fraction_non_alphanumeric': 0.14070588235294118, 'fraction_numerical': 0.007058823529411765, 'mean_word_length': 4.669333333333333, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '868361', 'n_tokens_mistral': 806, 'n_tokens_neox': 790, 'n_words': 218}