Skip to content

Commit

Permalink
don't check for snprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
alk committed Feb 14, 2021
1 parent 95b52b0 commit 73a72cd
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 23 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@ check_include_file("inttypes.h" HAVE_INTTYPES_H)
# We also need <ucontext.h>/<sys/ucontext.h>, but we get those from
# AC_PC_FROM_UCONTEXT, below.

# for windows
check_symbol_exists(snprintf stdio.h HAVE_SNPRINTF)

# We override a lot of memory allocation routines, not all of which are
# standard. For those the system doesn't declare, we'll declare ourselves.
set(CMAKE_REQUIRED_DEFINITIONS -D_XOPEN_SOURCE=600)
Expand Down
3 changes: 0 additions & 3 deletions cmake/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@
/* Define to 1 if you have the <sched.h> header file. */
#cmakedefine HAVE_SCHED_H

/* Define to 1 if you have the `snprintf' function. */
#cmakedefine HAVE_SNPRINTF

/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H

Expand Down
4 changes: 0 additions & 4 deletions src/windows/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,6 @@
# define _WIN32_WINNT 0x0501
#endif

#if defined(_MSC_VER) && _MSC_VER >= 1900
#define HAVE_SNPRINTF 1
#endif

// We want to make sure not to ever try to #include heap-checker.h
#define NO_HEAP_CHECK 1

Expand Down
2 changes: 0 additions & 2 deletions src/windows/mingw.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
# define _WIN32_WINNT 0x0501
#endif

#define HAVE_SNPRINTF 1

// Some mingw distributions have a pthreads wrapper, but it doesn't
// work as well as native windows spinlocks (at least for us). So
// pretend the pthreads wrapper doesn't exist, even when it does.
Expand Down
11 changes: 0 additions & 11 deletions src/windows/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,17 +318,6 @@ inline int perftools_vsnprintf(char *str, size_t size, const char *format,
}
#endif

#ifndef HAVE_SNPRINTF
inline int snprintf(char *str, size_t size, const char *format, ...) {
va_list ap;
int r;
va_start(ap, format);
r = perftools_vsnprintf(str, size, format, ap);
va_end(ap);
return r;
}
#endif

#ifndef HAVE_INTTYPES_H
#define PRIx64 "I64x"
#define SCNx64 "I64x"
Expand Down

0 comments on commit 73a72cd

Please sign in to comment.