[omniORB] Problem building omniORB 2.8.0 pre-release 2
Douglas Kosovic
douglask@dstc.edu.au
Wed, 01 Sep 1999 15:53:41 +1000
This is a multi-part message in MIME format.
--------------3939D6FE92308A755E8FA48A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
There is a problem when trying to compile the following omniORB 2.8.0
pre-release 2 file:
src/lib/omniORB2/orbcore/gatekeepers/alone
with Sun WorkShop C++ 4.2 and probably any C++ compiler that doesn't
have native support for the 'bool' type.
The attached patch fixes the problem, it replaces all instances of
'bool' with 'CORBA:Boolean', 'true' with '1' and 'false' with '0'.
Cheers,
Doug.
--------------3939D6FE92308A755E8FA48A
Content-Type: text/plain; charset=us-ascii;
name="gatekeeperpatch.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="gatekeeperpatch.txt"
*** src/lib/omniORB2/orbcore/gatekeepers/alone/gatekeeper.cc Wed Sep 1 15:36:54 1999
--- newsrc/lib/omniORB2/orbcore/gatekeepers/alone/gatekeeper.cc Wed Sep 1 15:36:14 1999
***************
*** 38,44 ****
//-----------------------------------------------------------------------------
! bool external_allowed = 0 ;
char *hosts_deny_table = (char*) "";
char *hosts_allow_table = (char*) "";
char * & gateKeeper::denyFile = hosts_deny_table ;
--- 38,44 ----
//-----------------------------------------------------------------------------
! CORBA::Boolean external_allowed = 0 ;
char *hosts_deny_table = (char*) "";
char *hosts_allow_table = (char*) "";
char * & gateKeeper::denyFile = hosts_deny_table ;
***************
*** 98,104 ****
//-----------------------------------------------------------------------------
CORBA::Boolean gateKeeper::checkConnect( _tcpStrand *s) {
//-----------------------------------------------------------------------------
! static bool gServerResolved = false ;
static struct sockaddr_in gServerAddr ;
static int gServerAddrSize = sizeof(gServerAddr) ;
static char gServerName[256] = "" ;
--- 98,104 ----
//-----------------------------------------------------------------------------
CORBA::Boolean gateKeeper::checkConnect( _tcpStrand *s) {
//-----------------------------------------------------------------------------
! static CORBA::Boolean gServerResolved = 0 ;
static struct sockaddr_in gServerAddr ;
static int gServerAddrSize = sizeof(gServerAddr) ;
static char gServerName[256] = "" ;
***************
*** 116,134 ****
// if no security, accepts connect.
// ********************************
if ( external_allowed )
! return true ;
// ********************************
// retrieve the client name
// ********************************
if ( getpeername ( handle, (struct sockaddr*) (void *) & clientAddr, & clientAddrSize ) ) {
orb_log ( "Failed to authenticate peer name: access denied...\n" ) ;
! return false ;
}
host = gethostbyaddr ( (const char *) & clientAddr.sin_addr, sizeof(clientAddr.sin_addr), clientAddr.sin_family ) ;
if ( ! host ) {
orb_log ( "Failed to retrieve client host infos: access denied...\n" ) ;
! return false ;
}
strcpy ( clientName, host->h_name ) ;
strcpy ( clientDotted, inet_ntoa ( *(struct in_addr *) host->h_addr_list[0] ) ) ;
--- 116,134 ----
// if no security, accepts connect.
// ********************************
if ( external_allowed )
! return 1 ;
// ********************************
// retrieve the client name
// ********************************
if ( getpeername ( handle, (struct sockaddr*) (void *) & clientAddr, & clientAddrSize ) ) {
orb_log ( "Failed to authenticate peer name: access denied...\n" ) ;
! return 0 ;
}
host = gethostbyaddr ( (const char *) & clientAddr.sin_addr, sizeof(clientAddr.sin_addr), clientAddr.sin_family ) ;
if ( ! host ) {
orb_log ( "Failed to retrieve client host infos: access denied...\n" ) ;
! return 0 ;
}
strcpy ( clientName, host->h_name ) ;
strcpy ( clientDotted, inet_ntoa ( *(struct in_addr *) host->h_addr_list[0] ) ) ;
***************
*** 140,155 ****
if ( ! gServerResolved ) {
if ( gethostname ( gServerName, sizeof(gServerName) ) ) {
orb_log ( "Failed to retrieve our host name: access denied\n" ) ;
! return false ;
}
host = gethostbyname ( gServerName ) ;
if ( ! host ) {
orb_log ( "Failed to retrieve our host infos: access denied...\n" ) ;
! return false ;
}
strcpy ( gServerName, host->h_name ) ;
strcpy ( gServerDotted, inet_ntoa ( *(struct in_addr *) host->h_addr_list[0] ) ) ;
! gServerResolved = true ;
}
--- 140,155 ----
if ( ! gServerResolved ) {
if ( gethostname ( gServerName, sizeof(gServerName) ) ) {
orb_log ( "Failed to retrieve our host name: access denied\n" ) ;
! return 0 ;
}
host = gethostbyname ( gServerName ) ;
if ( ! host ) {
orb_log ( "Failed to retrieve our host infos: access denied...\n" ) ;
! return 0 ;
}
strcpy ( gServerName, host->h_name ) ;
strcpy ( gServerDotted, inet_ntoa ( *(struct in_addr *) host->h_addr_list[0] ) ) ;
! gServerResolved = 1 ;
}
***************
*** 158,167 ****
// ********************************
if ( strcmp ( gServerDotted, clientDotted ) ) {
orb_log ( "%s: Access denied to %s (%s)\n", gServerName, clientName, clientDotted ) ;
! return false ;
}
! return true;
}
//-----------------------------------------------------------------------------
--- 158,167 ----
// ********************************
if ( strcmp ( gServerDotted, clientDotted ) ) {
orb_log ( "%s: Access denied to %s (%s)\n", gServerName, clientName, clientDotted ) ;
! return 0 ;
}
! return 1 ;
}
//-----------------------------------------------------------------------------
--------------3939D6FE92308A755E8FA48A--