Re: Logfiles above 2G

Guillaume Cottenceau <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Andreas Fink <andreas 'at' fink.org> writes:

> use of syslog is optional. I dont compile it with syslog as I want to
> have separate logfiles.

Syslog can log to multiple files. I think you should be able to
direct kannel logs to a separate file.

> my small test C programm shows that normal compilation hits this wall.
> But if I open the file with fopen64, then it works. Rather strange as
> Linux seems to be the only OS where this has been done like that.

As others pointed out, -D_FILE_OFFSET_BITS=64 is used so that the
glibc selects the large files IO functions without any change
needed to sourcecode.
 
> I'll check what the currentl CVS does about this.
> 
> -D_FILE_OFFSET_BITS=64 is not working here.

Which is very strange. It worked every time I checked. Are you
sure kannel compilation was really done with this additional
definition? First, I think you should check with the following
simple test, then try to pass it to kannel compilation if it works:

[gc@meuh /tmp] echo -e '#include <stdio.h>\nint main(){fopen("/dev/null", "r");}' > t.c
[gc@meuh /tmp] gcc t.c
[gc@meuh /tmp] ltrace ./a.out 2>&1| grep null
fopen("/dev/null", "r")                          = 0x804a008
[gc@meuh /tmp] gcc -D_FILE_OFFSET_BITS=64 t.c
[gc@meuh /tmp] ltrace ./a.out 2>&1| grep null
fopen64("/dev/null", "r")                        = 0x804a008

> will verify with -D_LARGE_FILES. Also I found similar names (but not

Never seen this one. Google seems to say it's useful for AIX not
Linux.

-- 
Guillaume Cottenceau
Create your personal SMS or WAP Service - visit http://mobilefriends.ch/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.