-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
64 bit time_t breaks radmind server #223
Comments
See also the "va_arg and netbsd-6" thread on the NetBSD pkgsrc-users list Original comment by: hfath |
Thanks for the detailed report.I think the PRItimet option looks better. Original comment by: fitterhappier |
Original comment by: fitterhappier |
"largefile.h" lookalike for 64 bit time_t Original comment by: hfath |
Looks better to me, too, especially since it is the path taken by off_t support. Attached a largefile.h lookalike, missing is the autotools support for detecting time_t size. Original comment by: hfath |
Thanks. I've added the check for time_t size to configure.ac, and am going through the project to replace 32-bit time_t conversions with a strtotimet macro. Original comment by: fitterhappier |
First pass at patch in master branch. Please pull from git, test and report here. Commit 9c355a1. Original comment by: fitterhappier |
Original comment by: fitterhappier |
Thanks for working on the problem. Unfortunately, I will be AFK from tomorrow until early October. I'll get back to you then. Original comment by: hfath |
Original comment by: hfath |
Sorry, it took a while to come back, then wrap my mind around checking out and building from git. I have a package now that checks out from git, and may commit it to pkgsrc-wip. Unfortunately, the server still has issues: [hf@Hochstuhl] ~ # cd /var/obj/pkgsrc/hauke/radmind-git/work/radmind/ Program received signal SIGSEGV, Segmentation fault. where snet.c:275 is 270 modifier: Original comment by: hfath |
It turned out that the time_t related entry was missing from config.h.in ... See http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/sysutils/radmind/patches/patch-config.h.in?rev=1.1, and you might also want the check for SIZEOF_TIME_T in http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/sysutils/radmind/patches/patch-largefile.h?rev=1.1. With the above patches, HEAD builds and runs fine on NetBSD 6. BTW, the build system does not ensure libsnet has been built before linking to it, and parallel makes fail. Given the size of the patches necessary to the 1.14.3 package (see http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/radmind/patches/), I guess a new release would be helpful? Cheerio, Original comment by: hfath |
The fixes have been merged - please close the issue. |
NetBSD 6 will ship with a 64 bit time_t, solving UNIXes year 2038 problem. Unfortunately, Radmind implicitely assumes sizeof(time_t) == 4.
The NetBSD PR 46555 at "http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=46555" has the details.
From here, I see two ways out: Teach the fprintf()-like snet functions about %jd, and cast the st_mtime field to (intmax_t), or come up with something like PRIofft, say: 'PRItimet', for time_t.
Original comment by: hfath
The text was updated successfully, but these errors were encountered: