bug-gnulib
[Top][All Lists]
Advanced

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

Re: Zile build breaks in lib/btow.c on NetBSD 1.5


From: Bruno Haible
Subject: Re: Zile build breaks in lib/btow.c on NetBSD 1.5
Date: Mon, 5 Apr 2010 00:39:51 +0100
User-agent: KMail/1.9.9

Hi,

Hauke Fath wrote:
> misses #including <stdlib.h> for the definition of mbtowc() alike to the
> BSD/OS case,
> 
> 
> btowc.c: In function `btowc':
> btowc.c:34: warning: implicit declaration of function `mbtowc'

To fix this warning, you need a #include <stdlib.h> in btowc.c. I don't
see a reason to include it in <wchar.h>.


2010-04-04  Bruno Haible  <address@hidden>

        btowc: Avoid warning.
        * lib/btowc.c: Include <stdlib.h>.
        Reported by Hauke Fath <address@hidden>.

--- lib/btowc.c.orig    Mon Apr  5 01:34:57 2010
+++ lib/btowc.c Mon Apr  5 01:27:46 2010
@@ -1,5 +1,5 @@
 /* Convert unibyte character to wide character.
-   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -21,6 +21,7 @@
 #include <wchar.h>
 
 #include <stdio.h>
+#include <stdlib.h>
 
 wint_t
 btowc (int c)




reply via email to

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