Project

General

Profile

Actions

Feature #2722

closed

define __STDC_WANT_LIB_EXT1__ for memset_s()

Added by gstrauss over 5 years ago. Updated over 5 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

define __STDC_WANT_LIB_EXT1__ for memset_s() and other C11 Annex K extensions, where available.

(see man page http://www.unix.com/man-page/osx/3/memset_s/ )

diff --git a/src/first.h b/src/first.h
index 0efd0f0..38a011f 100644
--- a/src/first.h
+++ b/src/first.h
@@ -9,4 +9,8 @@
 # endif
 #endif

+#ifndef __STDC_WANT_LIB_EXT1__
+#define __STDC_WANT_LIB_EXT1__ 1
+#endif
+
 #endif
Actions #1

Updated by gstrauss over 5 years ago

On some platforms, detection of memset_s() and defining HAVE_MEMSET_S might need user to run CPPFLAGS=-D__STDC_WANT_LIB_EXT1__=1 ./configure ... for make, or similar for SCons, CMake

Actions #2

Updated by gstrauss over 5 years ago

  • Target version changed from 1.4.x to 1.4.40
Actions #3

Updated by gstrauss over 5 years ago

  • Category set to core
Actions #4

Updated by gstrauss over 5 years ago

  • Status changed from New to Patch Pending
Actions #5

Updated by stbuehler over 5 years ago

As you said yourself __STDC_WANT_LIB_EXT1__ should also be used in the configure step.

Actions #6

Updated by gstrauss over 5 years ago

Would you like me to add -D__STDC_WANT_LIB_EXT1__=1 to CPPFLAGS in configure.ac and to add_definitions in src/CMakeLists.txt and autoconf.env.Append(CPPFLAGS = ... in SConstruct?

Actions #7

Updated by gstrauss over 5 years ago

  • Status changed from Patch Pending to Fixed

committed in 51e0f208 to add define to first.h

Depending on feedback from those using memset_s() on their platforms, we might need to additionally modify detection logic during build configure time.

Actions

Also available in: Atom