URL: <http://savannah.gnu.org/bugs/?40515>
Summary: Portability fixes for Tru64 V4.0G (and also HP-UX) Project: make Submitted by: iskunk Submitted on: Fri 08 Nov 2013 05:07:56 AM GMT Severity: 3 - Normal Item Group: Build/Install Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 4.0 Operating System: POSIX-Based Fixed Release: None Triage Status: None _______________________________________________________ Details: GNU Make 4.0 needed a bit of work to build and run on this platform. Everything is in the attached patch against git master; below are the issues addressed. 1. Tru64 doesn't know about RTLD_GLOBAL: cc: Error: /tmp/make-4.0/load.c, line 51: In this statement, "RTLD_GLOBAL" is not declared. (undeclared) global_dl = dlopen (NULL, RTLD_NOW|RTLD_GLOBAL); -----------------------------------------^ cc: Error: /tmp/make-4.0/load.c, line 68: In this statement, "RTLD_GLOBAL" is not declared. (undeclared) dlp = dlopen (concat (2, "./", ldname), RTLD_LAZY|RTLD_GLOBAL); ----------------------------------------------------------^ 2. va_copy() does not exist on this platform (but the definition near the top of output.c works) 3. vsnprintf() segfaults when passed a NULL buffer 4. When the buffer passed to Tru64's vsnprintf() is too small, the function returns (buffer_size - 1). The code was erroneously interpreting this to mean that the buffer was large enough, resulting in truncated output. I noticed bug #40361, and I also need to build GNU Make on HP-UX, so I rewrote the vfmtconcat() function to address the issues on both platforms. (The initial value of fmtbuf.size can be adjusted, of course. I didn't want to set an overly large value as that would potentially mask problems in the subsequent vsnprintf() loop.) It's worth noting that the Raptor library (librdf.org/raptor) handles vsnprintf() in a similar way; look at raptor/src/snprintf.c, specifically the VSNPRINTF_NOT_C99_BLOCK() macro. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Fri 08 Nov 2013 05:07:56 AM GMT Name: make-fixes.patch Size: 2kB By: iskunk Patch against git master <http://savannah.gnu.org/bugs/download.php?file_id=29567> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?40515> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make