bugmake - Bugs: bug #40515, Portability fixes for Tru64 V4.0G...

 
 

bug #40515: Portability fixes for Tru64 V4.0G (and also HP-UX)

Submitted by:  Daniel Richard G. <iskunk>
Submitted on:  Fri 08 Nov 2013 05:07:56 AM UTC  
 
Severity: 3 - NormalItem Group: Build/Install
Status: FixedPrivacy: Public
Assigned to: Paul D. Smith <psmith>Open/Closed: Closed
Component Version: 4.0Operating System: POSIX-Based
Fixed Release: 4.1Triage Status: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 24 Nov 2013 03:44:04 AM UTC, comment #1:

I fixed the various vsnprintf() issues with changes for bug #40361. For this bug I added the #define for RTLD_GLOBAL.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Fri 08 Nov 2013 05:07:56 AM UTC, original submission:

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.

Daniel Richard G. <iskunk>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #29567:  make-fixes.patch added by iskunk (2kB - text/x-patch - Patch against git master)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psmith (Posted a comment)
  • -unavailable- added by iskunk (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 24 Nov 2013 03:44:04 AM UTCpsmithStatusNone=>Fixed
      Assigned toNone=>psmith
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.1
    Fri 08 Nov 2013 05:07:56 AM UTCiskunkAttached File-=>Added make-fixes.patch, #29567

    Back to the top


    Powered by Savane 3.1-cleanup