r3716 | pemsley | 2011-10-27 20:33:17 +0100 (Thu, 27 Oct 2011) | 3 lines
Changed paths:
   M /trunk/compat/coot-getopt.h

Add a throw() to getop() prototype.  Needed for gcc 4.6.1 Fed 15.  Will this
   pass in other compilers?



I get the following error in 10.6 / OS X / XCode 4.1 / gcc 4.2.1  :


g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" 
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"coot\" 
-DVERSION=\"0.7-pre-1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
-DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I../compat -I../coords -I../utils 
-I../lidia-core -I../coot-utils -I../mini-mol -I../geometry -I/sw/include 
-DHAVE_MMDB_IGNORE_HASH -DHAVE_MMDB_WITH_CISPEP   
-I/sw/include/libglade-2.0/glade -I/sw/include/libglade-2.0 
-I/sw/include/python2.7  -I/sw/include/mmdb -I/sw/include/ssm 
-I/sw/include/gpp4/ccp4 -I/sw/include/clipper -I/sw/include 
-I/usr/X11R6/include -DHAVE_GSL -I/sw/include  -I/sw/include 
-DHAVE_MMDB_IGNORE_HASH -DHAVE_MMDB_WITH_CISPEP  -DHAVE_GSL  -g -O2 -MT 
with-map.o -MD -MP -MF .deps/with-map.Tpo -c -o with-map.o with-map.cc
In file included from with-map.cc:46:
/usr/include/unistd.h:458: error: declaration of ‘int getopt(int, char* const*, 
const char*)’ throws different exceptions
../compat/coot-getopt.h:141: error: from previous declaration ‘int getopt(int, 
char* const*, const char*) throw ()’


Not using throw(), made this file compile cleanly. 

F



---------------------------------------------
Francis E. Reyes M.Sc.
215 UCB
University of Colorado at Boulder

Reply via email to