[OpenAFS-devel] [PATCH] Problems compiling src/audit/audit.c
Stefaan
Stefaan <stefaan.deroeck@gmail.com>
Fri, 22 Jul 2005 22:50:16 +0200
------=_Part_1181_26873202.1122065416655
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
I have no clue about how cross-platform va_arg is, and how you should
use it for optimum portability, but on my alpha-linux I had problems
compiling 1.3.85, in the file audit.c
The attached file addressed the compiling errors and warnings on my
alpha-linux, and the same source still compiles in linux-x86. I
wasn't able to test any other platforms as of yet.
On a side note, I get lots of warnings about casts between pointers
and integers of different size. Are those negligible?
Regards,
Stefaan
------=_Part_1181_26873202.1122065416655
Content-Type: application/octet-stream; name="diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="diff"
LS0tIGF1ZGl0LmMub2xkCTIwMDUtMDctMjIgMjE6NTM6NTcgKzAyMDAKKysrIGF1ZGl0LmMJMjAw
NS0wNy0yMiAyMjoyNDozOSArMDIwMApAQCAtNTYsNyArNTYsNyBAQAogICAgIGludCB2YUludDsK
ICAgICBhZnNfaW50MzIgdmFMb25nOwogICAgIGNoYXIgKnZhU3RyOwotICAgIGNoYXIgKnZhTHN0
OworICAgIHZhX2xpc3QgdmFMc3Q7CiAgICAgc3RydWN0IEFGU0ZpZCAqdmFGaWQ7CiAKICAgICB2
YUVudHJ5ID0gdmFfYXJnKHZhTGlzdCwgaW50KTsKQEAgLTY1LDcgKzY1LDcgQEAKIAljYXNlIEFV
RF9TVFI6CQkvKiBTdHJpbmcgKi8KICAgICAgICAgY2FzZSBBVURfTkFNRTogICAgICAgICAgLyog
TmFtZSAqLwogICAgICAgICBjYXNlIEFVRF9BQ0w6ICAgICAgICAgICAvKiBBQ0wgKi8KLQkgICAg
dmFTdHIgPSAoY2hhciAqKXZhX2FyZyh2YUxpc3QsIGludCk7CisJICAgIHZhU3RyID0gKGNoYXIg
Kil2YV9hcmcodmFMaXN0LCBjaGFyICopOwogCSAgICBpZiAodmFTd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