modification for sun compiler
This commit is contained in:
parent
28622b5a75
commit
0d2b618f31
|
|
@ -1,3 +1,9 @@
|
|||
2010-10-05 Dietmar Warning
|
||||
* configure.ac: enabling openMP under SunStudio compiler
|
||||
* terminal.c, ivars.c, ifnewuid.c, inperror.c, main.c:
|
||||
asprintf definition also for sun compiler - can not be concentrated in
|
||||
ngspice.h because of libgen - libiberty conflict
|
||||
|
||||
============================ Rework-22 ==================================
|
||||
2010-10-04 Holger Vogt
|
||||
* miscoms.c: remove bug no. 3080398
|
||||
|
|
|
|||
10
configure.ac
10
configure.ac
|
|
@ -940,9 +940,9 @@ if test "$enable_adms" = "yes"; then
|
|||
AC_CHECK_PROGS(ADMSXML, admsXml admsXml.exe,no)
|
||||
|
||||
if test "$ADMSXML" = "no"; then
|
||||
AC_MSG_ERROR(If you want adms models you should install admsXml)
|
||||
AC_MSG_ERROR(If you want Verilog-A models you should install admsXml)
|
||||
fi
|
||||
AC_DEFINE(ADMS,[1],[Support for Verilog-A(MS) models])
|
||||
AC_DEFINE(ADMS,[1],[Support for Verilog-A models])
|
||||
|
||||
VLADEVDIR=" adms/ekv \
|
||||
adms/hicum0 \
|
||||
|
|
@ -1056,8 +1056,12 @@ dnl test for header
|
|||
AC_CHECK_HEADERS([omp.h],
|
||||
[AC_DEFINE(USE_OMP,[1],[OpenMP parallel processing])],
|
||||
[AC_MSG_ERROR(Couldn't find OpenMP headers.)])
|
||||
if test "x$GCC" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -fopenmp"
|
||||
dnl test if function is o.k.
|
||||
else
|
||||
CFLAGS="$CFLAGS -xopenmp"
|
||||
fi
|
||||
dnl test if timing function is o.k.
|
||||
AC_CHECK_FUNC(omp_get_wtime, [AC_MSG_RESULT(OpenMP features enabled)],
|
||||
[AC_MSG_ERROR(OpenMP not working correctly.)])
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -14,6 +14,17 @@ $Id$
|
|||
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef HAVE_ASPRINTF
|
||||
#ifdef HAVE_LIBIBERTY_H /* asprintf */
|
||||
#include <libiberty.h>
|
||||
#undef AND /* obsolete macro in ansidecl.h */
|
||||
#elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */
|
||||
#include <stdarg.h>
|
||||
extern int asprintf(char **out, const char *fmt, ...);
|
||||
extern int vasprintf(char **out, const char *fmt, va_list ap);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SGTTY_H
|
||||
#include <sgtty.h>
|
||||
#endif
|
||||
|
|
@ -22,17 +33,6 @@ $Id$
|
|||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ASPRINTF
|
||||
#ifdef HAVE_LIBIBERTY_H /* asprintf */
|
||||
#include <libiberty.h>
|
||||
#undef AND /* obsolete macro in ansidecl.h */
|
||||
#elif defined(__MINGW32__)/* we have asprintf, but not libiberty.h */
|
||||
#include <stdarg.h>
|
||||
extern int asprintf(char **out, const char *fmt, ...);
|
||||
extern int vasprintf(char **out, const char *fmt, va_list ap);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
/* Bad interaction with bool type in bool.h because curses also
|
||||
defines this symbol. */
|
||||
|
|
|
|||
10
src/main.c
10
src/main.c
|
|
@ -10,20 +10,20 @@
|
|||
|
||||
#include "ngspice.h"
|
||||
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef HAVE_ASPRINTF
|
||||
#ifdef HAVE_LIBIBERTY_H /* asprintf */
|
||||
#include <libiberty.h>
|
||||
#undef AND /* obsolete macro in ansidecl.h */
|
||||
#elif defined(__MINGW32__)/* we have asprintf, but not libiberty.h */
|
||||
#elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */
|
||||
#include <stdarg.h>
|
||||
extern int asprintf(char **out, const char *fmt, ...);
|
||||
extern int vasprintf(char **out, const char *fmt, va_list ap);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
|
||||
/* MINGW: random, srandom in libiberty.a, but not in libiberty.h */
|
||||
#if defined(__MINGW32__) && defined(HAVE_RANDOM)
|
||||
extern long int random (void);
|
||||
|
|
@ -648,7 +648,7 @@ read_initialisation_file(char * dir, char * name)
|
|||
{
|
||||
#ifndef HAVE_UNISTD_H
|
||||
FILE * fp = NULL;
|
||||
#endif /* not HAVE_ASPRINTF */
|
||||
#endif /* not HAVE_UNISTD_H */
|
||||
char * path;
|
||||
bool result = FALSE;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Copyright 1991 Regents of the University of California. All rights reserved.
|
|||
#ifdef HAVE_LIBIBERTY_H /* asprintf */
|
||||
#include <libiberty.h>
|
||||
#undef AND /* obsolete macro in ansidecl.h */
|
||||
#elif defined(__MINGW32__)/* we have asprintf, but not libiberty.h */
|
||||
#elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */
|
||||
#include <stdarg.h>
|
||||
extern int asprintf(char **out, const char *fmt, ...);
|
||||
extern int vasprintf(char **out, const char *fmt, va_list ap);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#ifdef HAVE_LIBIBERTY_H /* asprintf */
|
||||
#include <libiberty.h>
|
||||
#undef AND /* obsolete macro in ansidecl.h */
|
||||
#elif defined(__MINGW32__)/* we have asprintf, but not libiberty.h */
|
||||
#elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */
|
||||
#include <stdarg.h>
|
||||
extern int asprintf(char **out, const char *fmt, ...);
|
||||
extern int vasprintf(char **out, const char *fmt, va_list ap);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Author: 1985 Thomas L. Quarles
|
|||
#ifdef HAVE_LIBIBERTY_H /* asprintf */
|
||||
#include <libiberty.h>
|
||||
#undef AND /* obsolete macro in ansidecl.h */
|
||||
#elif defined(__MINGW32__)/* we have asprintf, but not libiberty.h */
|
||||
#elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */
|
||||
#include <stdarg.h>
|
||||
extern int asprintf(char **out, const char *fmt, ...);
|
||||
extern int vasprintf(char **out, const char *fmt, va_list ap);
|
||||
|
|
|
|||
Loading…
Reference in New Issue