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

Ticket #4103 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Name collision with nrand48

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


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

long nrand48(unsigned short *xsubi);

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

In the top-level, 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.


Change History

comment:1 Changed 7 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 7 years ago by jdsiiro

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

The fix in r1906 looks good to me...


Add a comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.