Problem 559

Summary: symbol CSTART in G4InterpolationScheme.hh
Product: Geant4 Reporter: ersmark
Component: processes/hadronic/modelsAssignee: Hans-Peter.Wellisch
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: other   
Hardware: PC   
OS: Linux   

Description ersmark 2003-12-18 08:20:47 CET
The preprocessor symbol CSTART is (can be?) defined in linux systems
---
> pwd
/usr/include

> grep -r CSTART .
./sys/ttydefaults.h:#define     CSTART          CTRL('q')
./sys/ttydefaults.h:    _POSIX_VDISABLE, CINTR, CQUIT,  CSUSP,  CDSUSP, CSTART,
CSTOP,  CLNEXT,
---

ttydefaults.h may be pulled into user code implicitly by way of G4UIterminal.hh.
If this is done before G4InterpolationScheme.hh is included (implicitly) errors
such as
---
/home/ersmark/sim/g4/include/G4InterpolationScheme.hh:39: warning: comma at end
of enumerator list
/home/ersmark/sim/g4/include/G4InterpolationScheme.hh:39: internal error:
Segmentation fault
---
are generated.

Preprocessor output demonstrating the problem:
---
> cpp -I/home/ersmark/sim/g4/hadronic_lists/include
-I/home/ersmark/sim/g4/include usercode.cc | grep -A5 'enum G4InterpolationScheme'
...
enum G4InterpolationScheme
{
  START, HISTO, LINLIN, LINLOG, LOGLIN, LOGLOG, RANDOM,
  ('q'&037), CHISTO, CLINLIN, CLINLOG, CLOGLIN, CLOGLOG, CRANDOM,
  USTART, UHISTO, ULINLIN, ULINLOG, ULOGLIN, ULOGLOG, URANDOM
};
...
---

I have encountered this problem when trying to use the xyz_HP hadronic physics
lists distributed with 6.0.

System: Geant4 6.0; shared global libs., Gentoo Linux 1.4, gcc 3.2.3
Comment 1 Hans-Peter.Wellisch 2004-01-23 10:00:59 CET
Thank you for the bug report. It is fiixed now, and will go out at the next
possibility.

Many greetings,

Hans-Peter.