Project

General

Profile

Feature #2722

define __STDC_WANT_LIB_EXT1__ for memset_s()

Added by gstrauss 12 months ago. Updated 12 months ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
2016-03-28
Due date:
% Done:

0%

Missing in 1.5.x:

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

Associated revisions

Revision 51e0f208 (diff)
Added by gstrauss 12 months ago

[core] define STDC_WANT_LIB_EXT1 (fixes #2722)

x-ref:
"define STDC_WANT_LIB_EXT1 for memset_s()"
https://redmine.lighttpd.net/issues/2722

History

#1 Updated by gstrauss 12 months 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

#2 Updated by gstrauss 12 months ago

  • Target version changed from 1.4.x to 1.4.40

#3 Updated by gstrauss 12 months ago

  • Category set to core

#4 Updated by gstrauss 12 months ago

  • Status changed from New to Patch Pending

#5 Updated by stbuehler 12 months ago

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

#6 Updated by gstrauss 12 months 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?

#7 Updated by gstrauss 12 months 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.

Also available in: Atom