]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Document transition from ANSI-C towards C-99
authorsashan <anedvedicky@gmail.com>
Tue, 3 Jun 2025 13:12:48 +0000 (15:12 +0200)
committerTomas Mraz <tomas@openssl.org>
Tue, 10 Jun 2025 17:58:41 +0000 (19:58 +0200)
The existing NOTES-ANSI.md are renamed to NOTES-C99.md and updated
accordingly. INSTALL.md lists C-99 compiler instead of ANSI-C now.
Also moving from ANSI-C to C-99 warrants updates to NEWS.md and
CHANGES.md.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/27751)

CHANGES.md
INSTALL.md
NEWS.md
NOTES-ANSI.md [deleted file]
NOTES-C99.md [new file with mode: 0644]

index 0261d880307e9d186561f5ab0756f08d37326e5c..00bf0c7861ebd85641283f77f80a3107f386ef05 100644 (file)
@@ -31,6 +31,11 @@ OpenSSL 3.6
 
 ### Changes between 3.5 and 3.6 [xx XXX xxxx]
 
+ * An ANSI-C toolchain is no longer sufficient for building OpenSSL. The code
+   should build on compilers supporting C-99 features.
+
+   *Alexandr Nedvedicky*
+
  * The VxWorks platforms have been removed. These platforms were unadopted,
    unmaintained and reported to be non-functional.
 
index 983f6aad136932f0d947e5d741936ee4f48227c5..cb54c7ea717a0480ac30680745047e84f1f71101 100644 (file)
@@ -51,7 +51,7 @@ To install OpenSSL, you will need:
  * A "make" implementation
  * Perl 5 with core modules (please read [NOTES-PERL.md](NOTES-PERL.md))
  * The Perl module `Text::Template` (please read [NOTES-PERL.md](NOTES-PERL.md))
- * an ANSI C compiler
+ * a C-99 compiler
  * POSIX C library (at least POSIX.1-2008), or compatible types and
    functionality.
  * a development environment in the form of development libraries and C
diff --git a/NEWS.md b/NEWS.md
index f7ca106e3b192f53b9fa63518a0c1ff322b26dbc..78b872efbd46c6baffe15f13c22d1679262387a3 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -28,6 +28,9 @@ OpenSSL 3.5
 This release incorporates the following potentially significant or incompatible
 changes:
 
+  * An ANSI-C toolchain is no longer sufficient for building OpenSSL. The code
+    should build on compilers supporting C-99 features.
+
   * The VxWorks platforms have been removed.
 
   * Added an `openssl configutl` utility for processing the openssl
diff --git a/NOTES-ANSI.md b/NOTES-ANSI.md
deleted file mode 100644 (file)
index feeb543..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-Notes on ANSI C
-===============
-
-When building for pure ANSI C (C89/C90), you must configure with at least
-the following configuration settings:
-
--   `no-asm`
-
-    There are cases of `asm()` calls in our C source, which isn't supported
-    in pure ANSI C.
-
--   `no-secure-memory`
-
-    The secure memory calls aren't supported with ANSI C.
-
--   `-D_XOPEN_SOURCE=1`
-
-    This macro enables the use of the following types, functions and global
-    variables:
-
-    -   `timezone`
-
--   `-D_POSIX_C_SOURCE=200809L`
-
-    This macro enables the use of the following types, functions and global
-    variables:
-
-    -   `ssize_t`
-    -   `strdup()`
-
-It's arguable that with gcc and clang, all of these issues are removed when
-defining the macro `_DEFAULT_SOURCE`.  However, that effectively sets the C
-language level to C99, which isn't ANSI C.
diff --git a/NOTES-C99.md b/NOTES-C99.md
new file mode 100644 (file)
index 0000000..ad3be43
--- /dev/null
@@ -0,0 +1,22 @@
+Notes on C-99
+=============
+
+This file contains a list of C-99 features we don't allow for OpenSSL.
+Starting with 3.6 OpenSSL project is going to gradually adopt C-99 features.
+The plan is to bring those features in small steps. Either with new
+code where particular C-99 construct makes sense (think of designated initializers),
+or when refactoring existing code and using C-99 language feature improves
+readability/maintainability of the code.  C-99 seems to be implemented by major
+compilers ([clang](https://clang.llvm.org/c_status.html#c99), [gcc](https://gcc.gnu.org/c99status.html), [msvc](https://learn.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-170)), therefore we can opt
+for permissive policy to adopt C-99 standard. This approach means OpenSSL
+project accepts all C-99 features except those explicitly listed here.
+The list here is going to be updated by features we either
+
+   - find not useful (or not a good match) for OpenSSL
+
+   - the feature is not implemented by some non-mainstream compiler which
+     we need to keep supported for benefit of OpenSSL users
+
+The list of C-99 features we don't support in OpenSSL project follows:
+
+   - do not use `//` for comments, stick to `/* ... */`