Bug 78238 - Rename socklen_t to kde_socklen_t for HP-UX
Summary: Rename socklen_t to kde_socklen_t for HP-UX
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources HP-UX
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-22 18:14 UTC by The Written Word
Modified: 2004-10-24 21:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch (2.88 KB, patch)
2004-03-22 18:14 UTC, The Written Word
Details

Note You need to log in before you can comment on or make changes to this bug.
Description The Written Word 2004-03-22 18:14:22 UTC
Version:            (using KDE KDE 3.2.1)
Installed from:    Compiled From Sources
OS:          HP/UX

On HP-UX 11i, we had to replace socklen_t with kde_socklen_t which is defined to socklen_t if it exists or some appropriate definition otherwise. The problem is that <sys/socket.h> defines socklen_t but _uses_ it only when _XOPEN_SOURCE_EXTENDED is defined:
typedef size_t socklen_t;
So, the test fails, defining socklen_t to 'int' which generates a failure because of the 'typedef size_t socklen_t' entry in <sys/socket.h>. So, we work around this by coming up with a new name, kde_socklen_t.
Comment 1 The Written Word 2004-03-22 18:14:37 UTC
Created attachment 5343 [details]
Patch
Comment 2 Marc Mutz 2004-10-24 18:44:47 UTC
This touches acinclude.m4, can't comment on that.
Thus reassigning to kio/general.
Comment 3 Stephan Kulow 2004-10-24 21:34:09 UTC
CVS commit by coolo: 

fixing use of socklen (the patch is in admin since quite some time)
BUG: 78238


  M +1 -1      smtp.cc   1.145


--- kdebase/kioslave/smtp/smtp.cc  #1.144:1.145
@@ -149,5 +149,5 @@ unsigned int SMTPProtocol::sendBufferSiz
   const int fd = fileno( fp );
   int value = -1;
-  ksize_t len = sizeof(value);
+  kde_socklen_t len = sizeof(value);
   if ( fd < 0 || ::getsockopt( fd, SOL_SOCKET, SO_SNDBUF, (char*)&value, &len ) )
     value = 1024; // let's be conservative