httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano.Zana...@esa.int
Subject apache 1.3.27 64bit on Solaris8...
Date Wed, 03 Sep 2003 13:27:14 GMT


...It's up and running.

Hi everyone,
my apologies in advance if you already know the following issue.
It's new to me.
I found no useful info about running a full 64 bit instance of Apache
(I have 1.3.27) on Solaris 8. Then, I preferred to compile it.
I did this by running GCC 3.2 compiler on a 64-bit enabled Solaris8
host, an old ultra-1 workstation.
Compiler switches to be defined *before* running ./configure:

CFLAGS='-O2 -mcpu=ultrasparc -mtune=ultrasparc -m64 -D_LARGEFILE64_SOURCE'

Actually, the necessary options are only -m64 and -D_LARGEFILE64_SOURCE,
while the rest is tuning.
I changed a few lines in the source code: alloc.c and http_log.c,
directory <your-sources-dir>/src/main.
Here are the diffs (alloc.c_32 and http_log.c_32 are the original ones):

$  diff alloc.c alloc.c_32
1795c1795
<     fd = open64(name, flg, mode);
---
>     fd = open(name, flg, mode);
1887c1887
<       desc = open64(name, baseFlag | O_APPEND | O_CREAT,
---
>       desc = open(name, baseFlag | O_APPEND | O_CREAT,
1895c1895
<       fd = fopen64(name, mode);
---
>       fd = fopen(name, mode);

---------------------

$ diff http_log.c http_log.c_32
284c284
<     if (replace_stderr && freopen64("/dev/null", "w", stderr) == NULL) {
---
>     if (replace_stderr && freopen("/dev/null", "w", stderr) == NULL) {
533,534c533,534
<     if(!(pid_file = fopen64(fname, "w"))) {
<       perror("fopen64");
---
>     if(!(pid_file = fopen(fname, "w"))) {
>       perror("fopen");

The above changes are necessary in order to be able
to open log files bigger than 2 GBytes (exactly: 2^31 bytes),
which was the problem that led me to do this stuff.
I'm aware of the fact that this is only *a part* of the work: some
other changes could be performed on the "support" programs:
logrotate, etc...

I hope it helps.

Cheers,

Stefano Zanasco
Serco AIS System Manager
ESA - ESRIN
Via Galileo Galilei
00044 Frascati (RM) - Italy
email:    Stefano.Zanasco<nospam>esa.int



Mime
View raw message