Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  14 Jan 2004, Konstantin Olchanski, , First try- midas on darwin/macosx xxx
    Reply  14 Jan 2004, Stefan Ritt, , First try- midas on darwin/macosx 
       Reply  16 Jan 2004, Konstantin Olchanski, , First try- midas on darwin/macosx xxx
          Reply  17 Jan 2004, Stefan Ritt, , First try- midas on darwin/macosx 
             Reply  18 Jan 2004, Konstantin Olchanski, , First try- midas on darwin/macosx xxx
                Reply  19 Jan 2004, Stefan Ritt, , First try- midas on darwin/macosx 
                   Reply  19 Jan 2004, Konstantin Olchanski, , First try- midas on darwin/macosx 
Message ID: 71     Entry time: 18 Jan 2004     In reply to: 70     Reply to this: 72
Author: Konstantin Olchanski 
Topic:  
Subject: First try- midas on darwin/macosx 
> I would like to keep all OS specific #includes in midasinc.h

No go. Here is the problem:

midasinc.h includes sys/mount.h, which #defines Free(x) to be something else
mana.c includes msystem.h, which includes midasinc.h
mana.c includes ROOT header files, which blow up because Free(x) is redefined.

I want this:

mana.c does *not* include sys/mount.h
system.c does include sys/mount.h

Simplest solution is to take sys/mount.h out of midasinc.h and include it in system.c

> Right, PVM should be replaced by HAVE_PVM.

Commited.

> > Then, a new problem- on MacOSX, pthread_t is not an "INT" and system.c:ss_thread_create() whines about it. I want to 
> > introduce a system dependant THREAD_T (or whatever) and make ss_thread_create() return that, rather than INT.
> Good. If you have a OS_MACOSX, that should help you there.

Okey. In Darwin, pthread_t is not an int. It is a pointer to a struct. In midas.c I typedef midas_pthread_t to HANDLE on Windows and to pthread_t n OS_UNIX.

This uncovered a problem with ss_getthandle(). What is it supposed to do? On Windows it returns a handle to the current thread, on OS_UNIX, it returns getpid(). 
What gives? I am leaving it alone for now.

Attached is the current diff. Most changes are in system.c: ss_timezone() and midas_pthread_t. The Makefile part is already commited. Building the shared 
library was made dependant on NEED_SHLIB. Now, building static midas applications is very simple, use "make SHLIB="

K.O.
Attachment 1: xxx  6 kB  Uploaded 24 Sep 2004  | Show | Show all
ELOG V3.1.4-2e1708b5