]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
trivial change: optionally suppress include lines
authorWo'O Ideafarm <ideafarmcity@gmail.com>
Fri, 28 Jul 2023 18:45:31 +0000 (11:45 -0700)
committerHugo Landau <hlandau@openssl.org>
Wed, 2 Aug 2023 19:31:44 +0000 (20:31 +0100)
CLA: trivial

Code that includes applink.c can now define APPLINK_NO_INCLUDES to suppress the include preprocessor lines in that file.  This might be needed if, for example, applink.c is being included into a source file that will be compiled to reference a C library built using different calling conventions.  (Example: Open Watcom.)

This pull request is intended to replace an identical pull request that I screwed up.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21595)

ms/applink.c

index 1d8ecf79e791676fd937a15965a21bbdf72b5083..460ee7339e8d56dae3c9961cfe71dfb46fa90b16 100644 (file)
 #define APPLINK_MAX     22      /* always same as last macro */
 
 #ifndef APPMACROS_ONLY
+
+/*
+ * Normally, do not define APPLINK_NO_INCLUDES.  Define it if you are using
+ * symbol preprocessing and do not want the preprocessing to affect the
+ * following included header files.  You will need to put these
+ * include lines somewhere in the file that is including applink.c.
+ */
+#ifndef APPLINK_NO_INCLUDES
 # include <stdio.h>
 # include <io.h>
 # include <fcntl.h>
+#endif
 
 # ifdef __BORLANDC__
    /* _lseek in <io.h> is a function-like macro so we can't take its address */