[CF-Devel] Compiling crossfire 1.1.0 on HPUX

Yann Chachkoff yann.chachkoff at mailandnews.com
Wed Apr 24 10:01:50 CDT 2002


>
     
     ===== Original Message From Karl-Jose Filler <
      
      josefiller at lucent.com
      
      > =====
     
     >
     
     Hi
     
     >
     
     
     >
     
     I'm trying to get crossfire running on an old HP box, the old one 0.9x ran 
     
     fine
>
     
     but it's gone ...
     
     >
     
     
     >
     
     No I try to get 1.1 running (first compiling) but
     
     >
     
     
     >
     
     include/plugin.h
     
     >
     
     
     >
     
     contains
     
     >
     
     
     >
     
     #include <dlfcn.h>
     
     >
     
     
     >
     
     and this file I cannot find on my HP.
     
     >
     
     
     >
     
     Am I the first one to put this on HP-UX, or are there any hints how to do it 
     
     ?
>
     
     
     >
     
     Thanks for your help
     
     >
     
     
     >
     
         Jose
     
     >
     
     
     >
     
     Environment:
     
     >
     
         CPU B132
     
     >
     
         OS: HP-UX 10.20
     
     >
     
         C-Compiler: gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
     
     
Sorry for not having answered faster to your question, but documentation about 
HPUX wasn't easy to find for me :)

It appears that HPUX uses a different shared library mechanism than most unix 
systems do. The common way is dlopen/dlclose while HPUX uses 
shl_load/shl_unload.

I do not have an HPUX system to test the following function wrappers. Tell me 
if those work well on your system:

Add the following functions in plugins.c;
Also replace #include <dlfcn.h> by #include <dl.h>;
Don't forget to update the function prototypes list (sproto.h) !

void *dlopen( const char *path, int mode )
{
    void *ret;
    ret = shl_load( path, BIND_IMMEDIATE | BIND_FIRST | BIND_VERBOSE, 0);
    return ret;
}

int dlclose( void *handle ) 
{
    return shl_unload( (shl_t) handle );
}

void *dlsym( void *handle, const char *sym )
{
    void *value=0;

    if ( shl_findsym( (shl_t*)&handle, sym, TYPE_PROCEDURE, &value ) != 0 )
        return 0;
    return value;
}

char *dlerror( void  )
{
    return strerror( errno );
}

------------------------------------------------
Visit 
     
     http://www.selentine.dyndns.org
     
      for a 
journey into a fantastic world !
(But don't expect too much...)
------------------------------------------------


    
    


More information about the crossfire mailing list