xref: /freebsd/crypto/openssl/doc/man3/OPENSSL_FILE.pod (revision 9f23cbd6cae82fd77edfad7173432fa8dccd0a95)
1=pod
2
3=head1 NAME
4
5OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC,
6OPENSSL_MSTR, OPENSSL_MSTR_HELPER
7- generic C programming utility macros
8
9=head1 SYNOPSIS
10
11 #include <openssl/macros.h>
12
13 #define OPENSSL_FILE /* typically: __FILE__ */
14 #define OPENSSL_LINE /* typically: __LINE__ */
15 #define OPENSSL_FUNC /* typically: __func__ */
16
17 #define OPENSSL_MSTR_HELPER(x) #x
18 #define OPENSSL_MSTR(x) OPENSSL_MSTR_HELPER(x)
19
20=head1 DESCRIPTION
21
22The macros B<OPENSSL_FILE> and B<OPENSSL_LINE>
23typically yield the current filename and line number during C compilation.
24When B<OPENSSL_NO_FILENAMES> is defined they yield B<""> and B<0>, respectively.
25
26The macro B<OPENSSL_FUNC> attempts to yield the name of the C function
27currently being compiled, as far as language and compiler versions allow.
28Otherwise, it yields "(unknown function)".
29
30The macro B<OPENSSL_MSTR> yields the expansion of the macro given as argument,
31which is useful for concatenation with string constants.
32The macro B<OPENSSL_MSTR_HELPER> is an auxiliary macro for this purpose.
33
34=head1 RETURN VALUES
35
36see above
37
38=head1 SEE ALSO
39
40L<crypto(7)>
41
42=head1 HISTORY
43
44B<OPENSSL_FUNC>, B<OPENSSL_MSTR>, and B<OPENSSL_MSTR_HELPER>
45were added in OpenSSL 3.0.
46
47=head1 COPYRIGHT
48
49Copyright 2018-2019 The OpenSSL Project Authors. All Rights Reserved.
50
51Licensed under the Apache License 2.0 (the "License").  You may not use
52this file except in compliance with the License.  You can obtain a copy
53in the file LICENSE in the source distribution or at
54L<https://www.openssl.org/source/license.html>.
55
56=cut
57