mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-08 06:44:11 +01:00
Fixed a few improper macro usages
Added compiler checks for some improper macro usage and fixed the problems pointed by gcc. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
0faff93cf7
commit
5770e53c50
@@ -242,7 +242,7 @@ char *wstrappend(char *dst, const char *src)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if HAVE_STRLCAT
|
#ifdef HAVE_STRLCAT
|
||||||
size_t
|
size_t
|
||||||
wstrlcat(char *dst, const char *src, size_t siz)
|
wstrlcat(char *dst, const char *src, size_t siz)
|
||||||
{
|
{
|
||||||
@@ -303,7 +303,7 @@ wstrlcat(char *dst, const char *src, size_t siz)
|
|||||||
}
|
}
|
||||||
#endif /* HAVE_STRLCAT */
|
#endif /* HAVE_STRLCAT */
|
||||||
|
|
||||||
#if HAVE_STRLCPY
|
#ifdef HAVE_STRLCPY
|
||||||
size_t
|
size_t
|
||||||
wstrlcpy(char *dst, const char *src, size_t siz)
|
wstrlcpy(char *dst, const char *src, size_t siz)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -143,6 +143,10 @@ AS_IF([test "x$debug" = "xyes"],
|
|||||||
dnl secured OS, and in a more general way generate binary code
|
dnl secured OS, and in a more general way generate binary code
|
||||||
dnl that may not be optimal
|
dnl that may not be optimal
|
||||||
AX_CFLAGS_GCC_OPTION([-Wtrampolines])
|
AX_CFLAGS_GCC_OPTION([-Wtrampolines])
|
||||||
|
dnl
|
||||||
|
dnl GCC provides a couple of checks to detect incorrect macro uses
|
||||||
|
AX_CFLAGS_GCC_OPTION([-Wundef])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-Wunused-macros])
|
||||||
], [dnl
|
], [dnl
|
||||||
dnl When debug not enabled, we try to avoid some non-necessary
|
dnl When debug not enabled, we try to avoid some non-necessary
|
||||||
dnl messages from the compiler
|
dnl messages from the compiler
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
|
|||||||
path = getenv("PATH");
|
path = getenv("PATH");
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
|
|
||||||
#if HAVE_LIBINTL_H && I18N
|
#if defined(HAVE_LIBINTL_H) && defined(I18N)
|
||||||
if (getenv("NLSPATH"))
|
if (getenv("NLSPATH"))
|
||||||
bindtextdomain("wmgenmenu", getenv("NLSPATH"));
|
bindtextdomain("wmgenmenu", getenv("NLSPATH"));
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user