You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-09-16 09:06:18 +02:00
Use externed instead of extern'd in comments.
This is mostly to revert some comment changes in b11ab9f7
that will break the ppc64le patch, but at the same time keep the spelling consistent in all comments and documentation.
Also revert some space changes for the same reason.
This commit is contained in:
@@ -80,9 +80,9 @@ This type of constant should mostly be used for strings. Use enums whenever poss
|
||||
|
||||
**String Constants**
|
||||
|
||||
String constants can be declared using the `STRING_STATIC()` macro for local strings and `STRING_EXTERN()` for strings that will be extern'd for use in other modules.
|
||||
String constants can be declared using the `STRING_STATIC()` macro for local strings and `STRING_EXTERN()` for strings that will be externed for use in other modules.
|
||||
|
||||
Extern'd strings should be declared in the header file as:
|
||||
Externed strings should be declared in the header file as:
|
||||
```c
|
||||
#define SAMPLE_VALUE "STRING"
|
||||
STRING_DECLARE(SAMPLE_VALUE_STR);
|
||||
@@ -91,7 +91,7 @@ And in the C file as:
|
||||
```c
|
||||
STRING_EXTERN(SAMPLE_VALUE_STR, SAMPLE_VALUE);
|
||||
```
|
||||
Static strings declared in the C file are not required to have a `#define` if the `#define` version is not used. Extern'd strings must always have the `#define` in the header file.
|
||||
Static strings declared in the C file are not required to have a `#define` if the `#define` version is not used. Externed strings must always have the `#define` in the header file.
|
||||
|
||||
**Enum Constants**
|
||||
|
||||
|
@@ -105,9 +105,9 @@ typedef struct InlineCommentExample
|
||||
|
||||
<p><b>String Constants</b></p>
|
||||
|
||||
<p>String constants can be declared using the <code>STRING_STATIC()</code> macro for local strings and <code>STRING_EXTERN()</code> for strings that will be extern'd for use in other modules.</p>
|
||||
<p>String constants can be declared using the <code>STRING_STATIC()</code> macro for local strings and <code>STRING_EXTERN()</code> for strings that will be externed for use in other modules.</p>
|
||||
|
||||
<p>Extern'd strings should be declared in the header file as:</p>
|
||||
<p>Externed strings should be declared in the header file as:</p>
|
||||
|
||||
<code-block type="c">
|
||||
#define SAMPLE_VALUE "STRING"
|
||||
@@ -120,7 +120,7 @@ typedef struct InlineCommentExample
|
||||
STRING_EXTERN(SAMPLE_VALUE_STR, SAMPLE_VALUE);
|
||||
</code-block>
|
||||
|
||||
<p>Static strings declared in the C file are not required to have a <code>#define</code> if the <code>#define</code> version is not used. Extern'd strings must always have the <code>#define</code> in the header file.</p>
|
||||
<p>Static strings declared in the C file are not required to have a <code>#define</code> if the <code>#define</code> version is not used. Externed strings must always have the <code>#define</code> in the header file.</p>
|
||||
|
||||
<p><b>Enum Constants</b></p>
|
||||
|
||||
|
@@ -181,7 +181,7 @@ By convention all buffer constant identifiers are appended with _BUF.
|
||||
#define BUFSTRDEF(stringdef) \
|
||||
BUF((unsigned char *)stringdef, (sizeof(stringdef) - 1))
|
||||
|
||||
// Used to declare buffer constants that will be extern'd using BUFFER_DECLARE(). Must be used in a .c file.
|
||||
// Used to declare buffer constants that will be externed using BUFFER_DECLARE(). Must be used in a .c file.
|
||||
#define BUFFER_STRDEF_EXTERN(name, string) \
|
||||
const Buffer *const name = BUFSTRDEF(string)
|
||||
|
||||
|
@@ -19,7 +19,7 @@ Variant Data Type
|
||||
/***********************************************************************************************************************************
|
||||
Constant variants that are generally useful
|
||||
***********************************************************************************************************************************/
|
||||
// Used to declare Bool Variant constants that will be extern'd using VARIANT_DECLARE(). Must be used in a .c file.
|
||||
// Used to declare Bool Variant constants that will be externed using VARIANT_DECLARE(). Must be used in a .c file.
|
||||
#define VARIANT_BOOL_EXTERN(name, dataParam) \
|
||||
const Variant *const name = ((const Variant *)&(const VariantBoolPub){.type = varTypeBool, .data = dataParam})
|
||||
|
||||
|
@@ -187,7 +187,7 @@ By convention all variant constant identifiers are appended with _VAR.
|
||||
#define VARSTR(dataParam) \
|
||||
((const Variant *)&(const VariantStringPub){.type = varTypeString, .data = (String *)(dataParam)})
|
||||
|
||||
// Used to declare String Variant constants that will be extern'd using VARIANT_DECLARE(). Must be used in a .c file.
|
||||
// Used to declare String Variant constants that will be externed using VARIANT_DECLARE(). Must be used in a .c file.
|
||||
#define VARIANT_STRDEF_EXTERN(name, dataParam) \
|
||||
const Variant *const name = VARSTRDEF(dataParam)
|
||||
|
||||
|
@@ -47,7 +47,7 @@ Prefix for environment variables
|
||||
#define PGBACKREST_ENV "PGBACKREST_"
|
||||
#define PGBACKREST_ENV_SIZE (sizeof(PGBACKREST_ENV) - 1)
|
||||
|
||||
// In some environments this will not be extern'd
|
||||
// In some environments this will not be externed
|
||||
extern char **environ;
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@@ -384,7 +384,7 @@ manifestNewInternal(void)
|
||||
/***********************************************************************************************************************************
|
||||
Ensure that symlinks do not point to the same file, directory, or subdirectory of another link
|
||||
|
||||
There are two implementations: manifestLinkCheck(), which is extern'd, and manifestLinkCheckOne(), which is intended to be
|
||||
There are two implementations: manifestLinkCheck(), which is externed, and manifestLinkCheckOne(), which is intended to be
|
||||
used internally during processing. manifestLinkCheck() works simply by calling manifestLinkCheckOne() for every link in the target
|
||||
list. manifestLinkCheckOne() is optimized to work quickly on a single link.
|
||||
***********************************************************************************************************************************/
|
||||
|
@@ -430,7 +430,7 @@ sub run
|
||||
{
|
||||
# If the function to shim is static then we need to create a declaration with the
|
||||
# original name so references to the original name in the C module will compile.
|
||||
# This is not necessary for extern'd functions since they should already have a
|
||||
# This is not necessary for externed functions since they should already have a
|
||||
# declaration in the header file.
|
||||
if ($strLine =~ /^${strFunction}\(/ && $stryShimModuleSrcRenamed[-1] =~ /^static /)
|
||||
{
|
||||
|
Reference in New Issue
Block a user