Advertisement

HP 9000 server programming

Started by May 22, 2005 07:58 PM
2 comments, last by markr 19 years, 9 months ago
Hello Everyone, Not really game development related but here it goes: I have been given a server program that was designed for an HP 9000 series server. The goal is to add some functionality to the server. The problem is I might not have access to the server itself so I have to work on linux on a normal pc. The server source code make files always have CC_CMD=cc -D_HPUX_SOURCE -Aa -g +w1 or similar statements inside. researching further, I found out that HP sells their own compiler HP C/ANSI C Developer's Bundle for Servers the questions are: 1. Can I develop the server in linux on a normal PC and use the actual server for testing or do I need to really get the HP compiler in order to develop? Is there a way to develop without the actual server? 2. If I change the makefiles and source to let the server program compile on linux, will this have problems on the actual HP server (performance, environment, etc)? Any help will be much appreciated, thanks.
---------------Magic is real, unless declared integer.- the collected sayings of Wiz Zumwalt
If the target environment is *nix (Unix variant or Linux variant), you can develop under Cygwin on a PC (Win32). If you have a Linux set up on a PC, that environment will also work OK.

The GNU compiler(s) should work fine. If you have to make any changes to the source code to compile under Cygwin or Linux, you should wrap those specific changes with #ifdef's (for example, different includes, around certain blocks of code, etc.). The #ifdef labels should either come from the (compiler) environment, or be defined using -D in the makefile command line.

The makefiles should also be generalized so that you can switch between a Linux/Cygwin target and an HP target (change the CC_CMD, etc.). You can use a variety of methods to determine build environment (/bin/uname -s, compare with "HP-UX") via scripts and GNU Makefiles. GNU Makefiles can be made portable between (at least) HP, Sun, Linux, and Cygwin (I've done this for a cross-platform project).
Advertisement
Thank you for the reply.
---------------Magic is real, unless declared integer.- the collected sayings of Wiz Zumwalt
You might be well advised to install gcc on the HP-UX box, I don't know how effective their compiler is, but my experience is that proprietry Unix compilers usually have bugs (especially with c++)

I've run gcc on HP-UX and it works fine - that should help with creating portable code between Windows / Linux (where of course, you can also use gcc) and HP.

Of course the actual system libraries are still different, but they are sufficiently similar Unix-like, that you can probably write code that doesn't need modification.

It depends really what it's going to do. The more advanced (or recent) Unix features, tend to be less standard.

Mark

This topic is closed to new replies.

Advertisement