gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/9] Refactor devices build


From: Ladislav Michl
Subject: Re: [PATCH 0/9] Refactor devices build
Date: Thu, 19 Nov 2020 18:31:45 +0100

On Thu, Nov 19, 2020 at 05:57:26PM +0100, Ladislav Michl wrote:
> Hi Pawel,
> 
> (and sorry for being so slow in responses)
> 
> On Sun, Jan 26, 2020 at 11:59:47PM +0100, Pawel Kot wrote:
> > Hi Ladis,
> > 
> > On Sat, Jan 25, 2020 at 10:42 AM Ladislav Michl <ladis@linux-mips.org>
> > wrote:
> > > this is next version of "Refactor devices build" patch broken into
> > > pieces. It is compile tested on Linux only (with exception of unixirda
> > > as IrDA support was removed from kernel with commit d64c2a76123f
> > > "staging: irda: remove the irda network stack and drivers" and even
> > > https://www.irda.org/ site turned into some obscure EMF Blockers
> > > selling stuff).
> > 
> > Thanks. I will be looking into these over a couple of next days. Meanwhile
> > I've pushed some changes required to (almost) compile successfully under
> > Microsoft Visual Studio. Seems it doesn't break thinks under Linux and OS X.
> 
> Both commits:
> 45b2e21cdb6: Put setenv() and unsetenv() declarations into compat.h
> c0fdacd1249: Reflect changes from common/snprintf.c in include/common.h
> break build for x86_64-w64-mingw32-gcc host. The first one is just a typo:
> --- a/include/compat.h
> +++ b/include/compat.h
> @@ -153,7 +153,7 @@ extern char *strndup(const char *src, size_t n);
>  #endif
>  
>  #ifndef HAVE_SETENV
> -extern int setenv(const char *name, cost char *value, int overwrite);
> +extern int setenv(const char *name, const char *value, int overwrite);
>  extern int unsetenv(const char *name);
>  #endif
> 
> While the second one leads to:
> In file included from getopt.c:69:
> ../include/compat.h: In function ‘rep_snprintf’:
> ../include/compat.h:222:67: error: expected declaration specifiers before 
> ‘PRINTF_ATTRIBUTE’
>   222 | int rep_snprintf(char *str, size_t size, const char *format, ...) 
> PRINTF_ATTRIBUTE(3, 4);

...typo as well:
--- a/include/compat.h
+++ b/include/compat.h
@@ -206,14 +206,14 @@ char *strsep(char **stringp, const char *delim);
 #endif
 
 #ifndef PRINTF_ATTRIBUTE
-#  ifdef HAVE___ATTRIVUTE__
+#  ifdef HAVE___ATTRIBUTE__
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
  * the parameter containing the format. and a2 the index of the first
  * argument. Not that some gcc 2.x versions don't handle this
  * properly **/
 #    define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, 
a2)))
 #  else
-#    define PRTINF_ATTRIBUTE(a1, a2)
+#    define PRINTF_ATTRIBUTE(a1, a2)
 #  endif
 #endif

Anyway, HAVE___ATTRIBUTE__ should come from autoconf, right?

        ladis 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]