| Thanks for the info! I think since it's just a warning it's a low
priority so no big worries for now.
Thanks!
steven
On Thu, Jan 7, 2010 at 10:00 AM, Felipe Sateler wrote:
> gcc -o OOps/remote.o -c -Wno-format -DGNU_GETTEXT -Wall -g
> -fomit-frame-pointer -freorder-blocks -DLINUX -DPIPES -fPIC -fPIC
> -DHAVE_LIBSNDFILE=1016 -DHAVE_FLTK -DBETA -DHAVE_SOCKETS
> -DHAVE_PTHREAD_BARRIER_INIT -DHAVE_SYNC_LOCK_TEST_AND_SET -DHAVE_FCNTL_H
> -DHAVE_UNISTD_H -DHAVE_STDINT_H -DHAVE_SYS_TIME_H -DHAVE_SYS_TYPES_H
> -DHAVE_TERMIOS_H -DHAVE_VALUES_H -DHAVE_SOCKETS -DHAVE_DIRENT_H
> -D__BUILDING_LIBCSOUND -I. -IH -I/usr/include/python2.5
> -I/usr/include/fltk-1.1 -I/usr/local/include -I/usr/include
> -I/usr/include -I/usr/X11R6/include OOps/remote.c
> OOps/remote.c: In function ‘CLopen’:
> OOps/remote.c:230: warning: implicit declaration of function ‘inet_aton’
>
>
> This warning is harmless as long as inet_aton returns an int, which is
> unlikely to change.
>
> I won't have time to delve into this for the next 4-6 weeks, but when I
> get back I will try to fix this. It might be simpler to just #include
> directly in remote.c before #including csoundCore.h.
>
> PS: the actual header is arpa/inet.h, not socket.h (but POSIX requires 3
> headers for that function, I do not know why).
>
>
> On Wed, 2010-01-06 at 12:52 -0500, Steven Yi wrote:
>> That is annoying!
>>
>> I did a grep and found:
>>
>> C:\work\workspace\csound5>grep socket.h * -n -r
>> H/remote.h:31:#include
>> Opcodes/sockrecv.c:32:#include
>> Opcodes/socksend.c:30:#include
>> SConstruct:843:elif configure.CheckHeader("sys/socket.h", language = "C"):
>> SConstruct2:785:elif configure.CheckHeader("sys/socket.h", language = "C"):
>>
>> Perhaps socket.h is getting included from some system header? Do you
>> have output from SCons that has the warning?
>>
>> On Wed, Jan 6, 2010 at 12:32 PM, Felipe Sateler wrote:
>> > Hmm, I'm starting to get annoyed by this maze of #includes. If I define
>> > _BSD_SOURCE via a -D flag or just at the top of remote.c, everything is
>> > OK. However, if I define it in remote.h just before #including the
>> > socket files, I get the warning about inet_aton. This means that somehow
>> > these files are being included before remote.h, via csoundCore.h.
>> >
>> > I'm still searching for that. In the meanwhile, I reverted 1.34.
>> >
>> >
>> > On Tue, 2010-01-05 at 19:23 -0500, Steven Yi wrote:
>> >> Hi Felipe,
>> >>
>> >> That seems fine to me, though shouldn't the _BSD_SOURCE be added to
>> >> remote.h instead of remote.c? It seems then we can isolate it to the
>> >> #else clause near the include of sys/socket.h as that isn't necessary
>> >> for Windows? Whichever way you decide, please feel free to commit and
>> >> I'll test on Windows after the commit and perhaps someone can test on
>> >> OSX to make sure that it is fine there too.
>> >>
>> >> Many thanks!
>> >> Steven
>> >>
>> >> On Tue, Jan 5, 2010 at 7:03 PM, Felipe Sateler wrote:
>> >> > On Tue, 2010-01-05 at 17:52 -0500, Steven Yi wrote:
>> >> >> HI Victor,
>> >> >>
>> >> >> Following up now that I'm back to Rochester and getting back into the
>> >> >> swing of things, I think your source may be out of date. :) In the
>> >> >> CVS history, it looks like:
>> >> >>
>> >> >> #include
>> >> >>
>> >> >> was added by Felipe Sateler on 11/26/2009 as part of revision 1.34.
>> >> >> However, sys/socket.h does exist in the remote.h file. There seems to
>> >> >> be a duplication of headers being included in both remote.c and
>> >> >> remote.h. I am not sure who wrote all of this originally so am asking
>> >> >> for others to take a look.
>> >> >>
>> >> >> I have deleted the #include from remote.c locally and it is now
>> >> >> building on MinGW (WinXP).
>> >> >>
>> >> >> Can we revert that commit? (Felipe?)
>> >> >
>> >> > I think it can... I added the include because I missed that remote.h
>> >> > already includes it. The thing is that I added it because gcc is warning
>> >> > about an implicit declaration of inet_aton, and for it to be defined
>> >> > POSIX says one should include 3 headers, of which sys/socket.h was
>> >> > missing in remote.c (but is present in remote.h, which I missed). The
>> >> > warning persists, and the reason seems to be that _BSD_SOURCE must be
>> >> > defined (but defining that causes other build failures). Removing the
>> >> > net includes from remote.c fixes that.
>> >> >
>> >> > I suggest defining _BSD_SOURCE, and removing the #ifdef LINUX section in
>> >> > remote.c (since it is a duplicate of what is in remote.h). I will apply
>> >> > the following diff if you find it acceptable:
>> >> >
>> >> > diff -u -r1.34 remote.c
>> >> > --- OOps/remote.c 26 Nov 2009 21:48:38 -0000 1.34
>> >> > +++ OOps/remote.c 6 Jan 2010 00:01:57 -0000
>> >> > @@ -22,16 +22,17 @@
>> >> > */
>> >> >
>> >> > #include "csoundCore.h"
>> >> > +
>> >> > +/* We need inet_aton, which requires _BSD_SOURCE */
>> >> > +#ifndef _BSD_SOURCE
>> >> > +#define _BSD_SOURCE
>> >> > +#endif
>> >> > +
>> >> > #include "remote.h"
>> >> >
>> >> > #ifdef HAVE_SOCKETS
>> >> > -#include
>> >> > #ifndef WIN32
>> >> > #include
>> >> > -#ifdef LINUX
>> >> > -#include
>> >> > -#include
>> >> > -#endif
>> >> > #include
>> >> > #endif
>> >> > #endif /* HAVE_SOCKETS */
>> >> >
>> >> > --
>> >> > Saludos,
>> >> > Felipe Sateler
>> >> >
>> >> > ------------------------------------------------------------------------------
>> >> > This SF.Net email is sponsored by the Verizon Developer Community
>> >> > Take advantage of Verizon's best-in-class app development support
>> >> > A streamlined, 14 day to market process makes app distribution fast and easy
>> >> > Join now and get one step closer to millions of Verizon customers
>> >> > http://p.sf.net/sfu/verizon-dev2dev
>> >> > _______________________________________________
>> >> > Csound-devel mailing list
>> >> > Csound-devel@lists.sourceforge.net
>> >> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >> >
>> >> >
>> >>
>> >> ------------------------------------------------------------------------------
>> >> This SF.Net email is sponsored by the Verizon Developer Community
>> >> Take advantage of Verizon's best-in-class app development support
>> >> A streamlined, 14 day to market process makes app distribution fast and easy
>> >> Join now and get one step closer to millions of Verizon customers
>> >> http://p.sf.net/sfu/verizon-dev2dev
>> >> _______________________________________________
>> >> Csound-devel mailing list
>> >> Csound-devel@lists.sourceforge.net
>> >> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> > --
>> > Saludos,
>> > Felipe Sateler
>> >
>> > ------------------------------------------------------------------------------
>> > This SF.Net email is sponsored by the Verizon Developer Community
>> > Take advantage of Verizon's best-in-class app development support
>> > A streamlined, 14 day to market process makes app distribution fast and easy
>> > Join now and get one step closer to millions of Verizon customers
>> > http://p.sf.net/sfu/verizon-dev2dev
>> > _______________________________________________
>> > Csound-devel mailing list
>> > Csound-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/csound-devel
>> >
>> >
>>
>> ------------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Verizon Developer Community
>> Take advantage of Verizon's best-in-class app development support
>> A streamlined, 14 day to market process makes app distribution fast and easy
>> Join now and get one step closer to millions of Verizon customers
>> http://p.sf.net/sfu/verizon-dev2dev
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
> --
> Saludos,
> Felipe Sateler
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net |