LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > lsapi + Sun Studio 10 Compilers

Reply
 
Thread Tools Display Modes
  #1  
Old 10-03-2005, 02:27 PM
jailbird jailbird is offline
Member
 
Join Date: Oct 2004
Posts: 23
Default lsapi + Sun Studio 10 Compilers

Hello,

Compiling the Litespeed API (PHP 5.1.0RC1) on Solaris Express: Community Release b23 using the Sun Studio 10 compilers, it complains very loudly about functions not declared as static using variables that are declared as static:

"/home/jailbird/php-5.1.0RC1/sapi/litespeed/lsapilib.c", line 128: reference to static identifier "g_running" in extern inline
function
"/home/jailbird/php-5.1.0RC1/sapi/litespeed/lsapilib.c", line 432: reference to static identifier "ack" in extern inline function
cc: acomp failed for /home/jailbird/php-5.1.0RC1/sapi/litespeed/lsapilib.c

Here is a quick patch to fix it:

--- litespeed/lsapilib.c 2005-09-25 10:51:32.000000000 -0500
+++ litespeed.new/lsapilib.c 2005-10-03 16:07:55.260000000 -0500
@@ -119,7 +119,7 @@
}
}

-inline int lsapi_read( int fd, void * pBuf, int len )
+static inline int lsapi_read( int fd, void * pBuf, int len )
{
int ret;
while( 1 )
@@ -427,7 +427,7 @@

static struct lsapi_packet_header ack = {'L', 'S',
LSAPI_REQ_RECEIVED, LSAPI_ENDIAN, {LSAPI_PACKET_HEADER_LEN} };
-inline int notify_req_received( LSAPI_Request * pReq )
+static inline int notify_req_received( LSAPI_Request * pReq )
{
if ( write( pReq->m_fd, &ack, LSAPI_PACKET_HEADER_LEN )
< LSAPI_PACKET_HEADER_LEN )
Reply With Quote
  #2  
Old 10-03-2005, 02:47 PM
jailbird jailbird is offline
Member
 
Join Date: Oct 2004
Posts: 23
Okay... now it bombed out in linking:

Undefined first referenced
symbol in file
swapIntEndian /tmp/postoBAAZkayPr
isPipe /tmp/postoBAAZkayPr
allocateBuf /tmp/postoBAAZkayPr
verifyHeader /tmp/postoBAAZkayPr
fixEndian /tmp/postoBAAZkayPr
ld: fatal: Symbol referencing errors. No output written to sapi/litespeed/php

Second patch:

--- litespeed/lsapilib.c 2005-09-25 10:51:32.000000000 -0500
+++ litespeed.new/lsapilib.c 2005-10-03 16:30:08.090000000 -0500
@@ -198,7 +198,7 @@
//}


-inline int allocateBuf( LSAPI_Request * pReq, int size )
+static inline int allocateBuf( LSAPI_Request * pReq, int size )
{
char * pBuf = (char *)realloc( pReq->m_pReqBuf, size );
if ( pBuf )
@@ -225,7 +225,7 @@
return 0;
}

-inline int verifyHeader( struct lsapi_packet_header * pHeader, char pktType )
+static inline int verifyHeader( struct lsapi_packet_header * pHeader, char pktType )
{
if (( LSAPI_VERSION_B0 != pHeader->m_versionB0 )||
( LSAPI_VERSION_B1 != pHeader->m_versionB1 )||
@@ -265,7 +265,7 @@

}

-inline int isPipe( int fd )
+static inline int isPipe( int fd )
{
char achPeer[128];
int len = 128;
@@ -312,7 +312,7 @@
return 0;
}

-inline void swapIntEndian( int * pInteger )
+static inline void swapIntEndian( int * pInteger )
{
char * p = (char *)pInteger;
register char b;
@@ -325,7 +325,7 @@

}

-inline void fixEndian( LSAPI_Request * pReq )
+static inline void fixEndian( LSAPI_Request * pReq )
{
struct lsapi_req_header *p= pReq->m_pHeader;
swapIntEndian( &p->m_httpHeaderLen );
Reply With Quote
  #3  
Old 10-03-2005, 07:20 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Thank you for bug report and patches. :-)

We had made all inline functions static in the 1.4 release with other bug fixes. Please use the new code base.
Reply With Quote
  #4  
Old 10-04-2005, 01:28 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Another minor bug has been fixed, please upgrade to 1.5 release.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setup for Rails via Litespeed Ruby LSAPI Justin Ruby/Rails 2 12-08-2007 07:19 PM
Ruby LSAPI 2.4 and PHP LSAPI 3.1 released mistwang News 0 04-24-2007 03:35 PM
Rails, LSAPI, Rewrites, Contexts, Authentication mabonyi Install/Configuration 2 02-11-2007 06:10 PM
LSAPI Ruby v1.12, PHP v2.4 Released mistwang News 0 01-10-2007 01:18 PM
lsapi processes not being used, build up to > max_connections fantasydreaming Bug Reports 8 12-01-2006 08:59 AM


All times are GMT -7. The time now is 01:54 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.