Berkeley DB Reference Guide: Building Berkeley DB for UNIX systems
Description: Berkeley DB: An embedded database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++

### Berkeley DB Reference Guide: Building Berkeley DB for UNIX systems |

# HP-UX

1. I can't specify the DB_SYSTEM_MEM flag to DBENV->open.

   The shmget(2) interfaces are not always used on HP-UX, even though they exist, as anonymous memory allocated using shmget(2) cannot be used to store the standard HP-UX msemaphore semaphores. For this reason, it may not be possible to specify the DB_SYSTEM_MEM flag on some versions of HP-UX.

   In addition, it is not possible to store the standard HP-UX msemaphore semaphores in memory returned by malloc(3). For this reason, it may not be possible to specify both the DB_PRIVATE and DB_THREAD flags on some versions of HP-UX.

2. I can't compile and run multi-threaded applications.

   Special compile-time flags are required when compiling threaded applications on HP-UX. If you are compiling a threaded application, you must compile with the _REENTRANT flag:

   >     cc -D_REENTRANT ...

   The Berkeley DB library will automatically build with the correct options.

3. An ENOMEM error is returned from DBENV->open or DBENV->remove.

   Due to the constraints of the PA-RISC memory architecture, HP-UX does not allow a process to map a file into its address space multiple times. For this reason, each Berkeley DB environment may be opened only once by a process on HP-UX, i.e., calls to DBENV->open will fail if the specified Berkeley DB environment has been opened and not subsequently closed.

4. When compiling with gcc, I see the following error:

   >     #error "Large Files (ILP32) not supported in strict ANSI mode."

   We believe this is an error in the HP-UX include files, but we don't really understand it. The only workaround we have found is to add -D__STDC_EXT__ to the C preprocessor defines as part of compilation.

Copyright Sleepycat Software