Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Ticket #4103 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Name collision with nrand48

Reported by: briadam Owned by: jdsiiro
Priority: normal Milestone:
Component: Source Code Version:
Keywords: Cc: wjbohnh@…

Description

I'm not able to appreciate the history enough to make a fix. Utilib's LCG.cpp has the following declaration

#ifdef UTILIB_HAVE_NRAND48
long nrand48(unsigned short *xsubi);
#endif

which collides with the system-provided one from stdlib.h on some systems, e.g., BlueGene?/P.

In the top-level configure.ac, there is AC_CHECK_FUNCS([nrand48]) which should test for this function and define HAVE_NRAND48 and consequently UTILIB_HAVE_NRAND48.

I'd suggest just removing the nrand48 prototype from LCG.cpp since it should be provided by cstdlib's wrapping of stdlib.h's nrand48.

Attachments

Change History

comment:1 Changed 3 years ago by briadam

Referenced in changeset [1906]:

Removing declaration of nrand48 to resolve ticket #4103. The prototype should be available in stdlib, if not on some platform, we'll attempt a more portable fix.

comment:2 Changed 3 years ago by jdsiiro

  • Status changed from new to closed
  • Resolution set to fixed

The fix in r1906 looks good to me...

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.