Skip to content

Commit

Permalink
trivial change: optionally suppress include lines
Browse files Browse the repository at this point in the history
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 #21595)
  • Loading branch information
Wo'O Ideafarm authored and hlandau committed Aug 2, 2023
1 parent 38c70a1 commit fafb7d3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ms/applink.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,18 @@
#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 */
Expand Down

0 comments on commit fafb7d3

Please sign in to comment.