rsyslog/tools/omfile.h
Thomas Blume 4cacfc34e8 satisfy-gcc-flag-fno-common
Porting advice for gcc 10:

A common mistake in C is omitting <code>extern</code> when declaring a global
variable in a header file.  If the header is included by several files it
results in multiple definitions of the same variable.  In previous GCC versions
this error is ignored.  GCC 10 defaults to <code>-fno-common</code>, which
means a linker error will now be reported. To fix this, use <code>extern</code>
in header files when declaring global variables, and ensure each global is
defined in exactly one C file. As a workaround, legacy C code can be compiled
with -fcommon.
2020-01-09 11:16:22 +01:00

39 lines
1.4 KiB
C

/* omfile.h
* These are the definitions for the build-in file output module.
*
* File begun on 2007-07-21 by RGerhards
*
* Copyright 2007-2012 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of rsyslog.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* -or-
* see COPYING.ASL20 in the source distribution
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef OMFILE_H_INCLUDED
#define OMFILE_H_INCLUDED 1
/* prototypes */
rsRetVal modInitFile(int iIFVersRequested __attribute__((unused)), int *ipIFVersProvided, rsRetVal (**pQueryEtryPt)(),
rsRetVal (*pHostQueryEtryPt)(uchar*, rsRetVal (**)()), modInfo_t*);
/* the define below is dirty, but we need it for ompipe integration. There is no
* other way to have the functionality (well, one way would be to go through the
* globals, but that seems not yet justified. -- rgerhards, 2010-03-01
*/
extern uchar *pszFileDfltTplName;
#endif /* #ifndef OMFILE_H_INCLUDED */
/* vi:set ai:
*/