Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3283 in orxonox.OLD for orxonox/branches


Ignore:
Timestamp:
Dec 26, 2004, 12:24:18 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/updater: now also works, if no pthread is found, but gthread is.

Location:
orxonox/branches/updater
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/configure

    r3274 r3283  
    873873  --without-gtk           Prevents GTK from being loaded
    874874  --without-gthread       Prevents gThread from being loaded
     875  --without-pthread       Prevents pthread from being loaded
    875876  --without-curl          Prevents libcURL from being loaded
    876877  --without-sdl-image     Prevents SDL_image from being loaded
     
    39063907fi
    39073908
     3909## pthread-disabled
     3910echo "$as_me:$LINENO: checking if pthread should be enabled" >&5
     3911echo $ECHO_N "checking if pthread should be enabled... $ECHO_C" >&6
     3912
     3913# Check whether --with-pthread or --without-pthread was given.
     3914if test "${with_pthread+set}" = set; then
     3915  withval="$with_pthread"
     3916  def_pthread=no
     3917else
     3918  def_pthread=yes
     3919fi;
     3920if test "$def_pthread" = yes; then
     3921  echo "yes"
     3922fi
     3923if test "$def_pthread" = no; then
     3924  echo "no"
     3925fi
     3926
    39083927## libCurl disabled?
    39093928echo "$as_me:$LINENO: checking if libcURL should be enabled" >&5
     
    69706989
    69716990##checking for pthread
    6972 if test x$have_gthread = xyes ; then
     6991if test x$def_pthread = xyes ; then
     6992 if test x$have_gthread = xyes ; then
    69736993
    69746994for ac_header in pthread.h
     
    71887208      LIBS="$LIBS -lpthread"
    71897209   fi
    7190 fi
    7191 
     7210 fi
     7211fi
    71927212# FIXME: Replace `main' with a function in `-lm':
    71937213
  • orxonox/branches/updater/configure.ac

    r3274 r3283  
    6565fi
    6666if test "$def_gthread" = no; then
     67  echo "no"
     68fi
     69
     70## pthread-disabled
     71AC_MSG_CHECKING([if pthread should be enabled])
     72AC_ARG_WITH([pthread],
     73        AC_HELP_STRING( [--without-pthread],
     74        [Prevents pthread from being loaded]), [def_pthread=no], [def_pthread=yes])
     75if test "$def_pthread" = yes; then
     76  echo "yes"
     77fi
     78if test "$def_pthread" = no; then
    6779  echo "no"
    6880fi
     
    404416
    405417##checking for pthread
    406 if test x$have_gthread = xyes ; then
     418if test x$def_pthread = xyes ; then
     419 if test x$have_gthread = xyes ; then
    407420  AC_CHECK_HEADERS([pthread.h], pthreadHeader="yes", pthreadHeader="no")
    408421  AC_CHECK_LIB([pthread], [main], FOUND_pthread=yes)
     
    410423      LIBS="$LIBS -lpthread"
    411424   fi
    412 fi
    413 
     425 fi
     426fi
    414427# FIXME: Replace `main' with a function in `-lm':
    415428 AC_CHECK_LIB([m], [main])
  • orxonox/branches/updater/src/gui/orxonox_gui_update.cc

    r3282 r3283  
    318318void* OrxonoxGuiUpdate::downloadThread(void* fileInfo)
    319319{
     320#ifdef HAVE_PTHREAD_H
    320321  pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
    321322  gdk_threads_enter();
     323#endif /* HAVE_PTHREAD_H */
    322324  FileInfo* info = (FileInfo*)fileInfo;
    323325  info->stateButton->disconnectSignal(info->buttonSignal);
     
    325327#ifdef HAVE_PTHREAD_H
    326328  info->stateButton->setTitle("cancel");
     329  gdk_threads_leave();
    327330#else /* HAVE_PTHREAD_H */
    328331  info->stateButton->setTitle("please wait");
    329332#endif /* HAVE_PTHREAD_H */
    330   gdk_threads_leave();
    331333  pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
    332334
     
    343345#ifdef HAVE_PTHREAD_H
    344346  pthread_join (*downloadThreadID, NULL);
    345 #endif /* HAVE_PTHREAD_H */
    346347  gdk_threads_enter();
     348#endif /* HAVE_PTHREAD_H */
    347349  if (curlHandle)
    348350    curl_easy_cleanup(curlHandle);
     
    358360  info->buttonSignal = info->stateButton->connectSignal("button_press_event", info, updateDataFunc);
    359361  isDownloading = false;
     362#ifdef HAVE_PTHREAD_H
    360363  gdk_threads_leave();
     364#endif /* HAVE_PTHREAD_H */
    361365
    362366}
Note: See TracChangeset for help on using the changeset viewer.