Re: [Plib-devel] patch for compiling on Solaris 10
Brought to you by:
sjbaker
From: Fay J. F Dr C. U. AFSEO/SK <joh...@eg...> - 2006-12-14 22:08:50
|
Vikas, I've not looked at the "socklen_t" problem yet. I fixed the "strstr" typecast problem by adding a conditional compilation--it seems that the Borland compiler does the same thing, so I set the "UL_BB" flag--but changed its name to "UL_EXPLICIT_CASTS". John F. Fay Technical Fellow Jacobs/Sverdrup TEAS Group 850-883-1294 -----Original Message----- From: pli...@li... [mailto:pli...@li...] On Behalf Of Vikas N Kumar Sent: Monday, December 11, 2006 1:17 PM To: pli...@li... Subject: Re: [Plib-devel] patch for compiling on Solaris 10 Hi John, The configure script added the -Dsocklen_t=int in my compile line. Why it did that I have no idea, I did not look. I will look at it and let you know. The sun studio 11 C++ compiler was giving an error in saying strstr was returning a const char*. I guess that is how it is on Solaris 10. I shall look into that too. You could however use the UL_BB #ifdefs and do it instead of the explicit cast. Even for the socklen_t=int problem, one could test for UL_SOLARIS and then do the #undef statements as given in the patch as opposed to undefining it without any Operating system checks. Regards, Vikas > From: Fay John F Dr CTR USAF AFSEO/SK <joh...@eg...> > Subject: Re: [Plib-devel] patch for compiling on Solaris 10 > Vikas, > > I'm a little confused about the "socklen_t" problem you mention. I > looked around the Linux system header files a bit and find > > #ifndef __socklen_t_defined > typedef __socklen_t socklen_t > #endif > > The only place I see "socklen_t" used in PLIB is in "netSocket.cxx", where > it is defined to be "int" under MSVC if it has not already been defined. As > such, perhaps the problem lies with the "configure" adding that flag to your > compile line. Does anybody know what causes it? > > I am similarly confused by the addition of "(char *)" to the > "strstr" call in netChat.cxx. The "strstr" function already returns a value > of type "char *" so the cast should be unnecessary. Is there something > about the Sun Studio 11 compiler that is nonstandard? If there is, I will > certainly be willing to add the explicit cast, but if not I would just as > soon leave it out. (Perhaps we should use a "#ifdef UL_BB" block here.) > > John F. Fay > Technical Fellow > Jacobs/Sverdrup TEAS Group > 850-883-1294 -- http://www.vikaskumar.org/ ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ plib-devel mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-devel |