Skip to content

Commit

Permalink
- Fix wrong prototype used in some libraries
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15754 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 6, 2013
1 parent 11e27ea commit d501b6a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
4 changes: 1 addition & 3 deletions SimulationRuntime/c/meta/meta_modelica_segv.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <assert.h>
#include <pthread.h>
#include <setjmp.h>
#include <unistd.h>

/* Really 64kB memory for this? Oh well... */
#define TRACE_NFRAMES 65536
Expand Down Expand Up @@ -113,13 +114,10 @@ static void getStackBase() {
*/
pthread_t self = pthread_self();
#if !defined(__APPLE_CC__)
struct rlimit rl;
size_t size = 0;
pthread_attr_t sattr;
pthread_attr_init(&sattr);
pthread_getattr_np(self, &sattr);
/* assert(0==getrlimit(RLIMIT_STACK,&rl));
stackSize = rl.rlim_cur; */
assert(0==pthread_attr_getstack(&sattr, &stackBottom, &size));
assert(stackBottom);
pthread_attr_destroy(&sattr);
Expand Down
4 changes: 4 additions & 0 deletions SimulationRuntime/c/simulation/solver/linearSolverLapack.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@

#include "linearSystem.h"
#include "linearSolverLapack.h"
#include "blaswrap.h"
#include "f2c.h"
extern int dgesv_(integer *n, integer *nrhs, doublereal *a, integer *lda,
integer *ipiv, doublereal *b, integer *ldb, integer *info);

typedef struct DATA_LAPACK
{
Expand Down
8 changes: 1 addition & 7 deletions SimulationRuntime/c/simulation/solver/linearSolverLapack.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,17 @@
extern "C" {
#endif

#include "blaswrap.h"
#include "f2c.h"

#ifdef VOID
#undef VOID
#endif

extern int dgesv_(integer *n, integer *nrhs, doublereal *a, integer *lda,
integer *ipiv, doublereal *b, integer *ldb, integer *info);

#ifdef __cplusplus
}
#endif

int allocateLapackData(int size, void **data);
int freeLapackData(void **data);
int solvePack(DATA *data, int sysNumber);
int solveLapack(DATA *data, int sysNumber);

#endif

Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

#include "nonlinearSystem.h"
#include "nonlinearSolverHybrd.h"
extern doublereal enorm_(integer *n, doublereal *x);

typedef struct DATA_HYBRD
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "nonlinearSystem.h"
#include "nonlinearSolverNewton.h"
#include "f2c.h"
extern doublereal enorm_(integer *n, doublereal *x);

typedef struct DATA_NEWTON
{
Expand Down

0 comments on commit d501b6a

Please sign in to comment.