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

#ifdef HAVE_SYS_SOCKIO_H
/* For older versions of Solaris... */
#include <sys/sockio.h>
#endif


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <signal.h>

#include "unpifi.h"
#include "error.h"

/* HP-UX, Solaris */
#if !defined(ifr_mtu) && defined(ifr_metric)
# define ifr_mtu        ifr_metric
#endif

#define Calloc calloc
#define Malloc malloc

int
Socket(int family, int type, int protocol)
{
  int             n;

  if ( (n = socket(family, type, protocol)) < 0)
    err_sys("socket error");
  return(n);
}

int
Ioctl(int fd, int request, void *arg)
{
  int             n;

  if ( (n = ioctl(fd, request, arg)) == -1)
    err_sys("ioctl error");
  return(n);      /* streamio of I_LIST returns value */
}

struct ifi_info *<commit_msg>prevent sign expansion problems with 64bit platforms that define the ioctl request parameter as long (*BSD)<commit_after>#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifdef HAVE_SYS_SOCKIO_H
/* For older versions of Solaris... */
#include <sys/sockio.h>
#endif


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <signal.h>

#include "unpifi.h"
#include "error.h"

/* HP-UX, Solaris */
#if !defined(ifr_mtu) && defined(ifr_metric)
# define ifr_mtu        ifr_metric
#endif

#define Calloc calloc
#define Malloc malloc

int
Socket(int family, int type, int protocol)
{
  int             n;

  if ( (n = socket(family, type, protocol)) < 0)
    err_sys("socket error");
  return(n);
}

int
Ioctl(int fd, unsigned long request, void *arg)
{
  int             n;

  if ( (n = ioctl(fd, request, arg)) == -1)
    err_sys("ioctl error");
  return(n);      /* streamio of I_LIST returns value */
}

struct ifi_info *
{'fraction_non_alphanumeric': 0.14309576837416482, 'fraction_numerical': 0.0033407572383073497, 'mean_word_length': 3.4590570719602978, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, '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': '1174133', 'n_tokens_mistral': 678, 'n_tokens_neox': 663, 'n_words': 190}