Sha256: b3ef6ff4968871cfec5e33cf8bdd2511142564459277bee6a486f00d13a7a707

Contents?: true

Size: 413 Bytes

Versions: 1

Compression:

Stored size: 413 Bytes

Contents

//
// strdup.c
//
// Copyright (c) 2014 Stephen Mathieson
// MIT licensed
//

#ifndef _WIN32
#ifndef MATHEMATICAL_SKIP_STRDUP
#ifndef HAVE_STRDUP

#include <stdlib.h>
#include <string.h>
#include "strdup.h"

char *
strdup(const char *str) {
  if (!str) return NULL;
  int len = strlen(str) + 1;
  char *buf = malloc(len);
  if (buf) memcpy(buf, str, len);
  return buf;
}

#endif /* HAVE_STRDUP */
#endif
#endif

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mathematical-1.6.3 ext/mathematical/mtex2MML/deps/strdup/strdup.c