Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3273 in orxonox.OLD for orxonox/branches/updater/src


Ignore:
Timestamp:
Dec 24, 2004, 9:43:22 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/updater: checking if pthread is an option

Location:
orxonox/branches/updater/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/updater/src/Makefile.in

    r3271 r3273  
    282282          esac; \
    283283        done; \
    284         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/Makefile'; \
     284        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
    285285        cd $(top_srcdir) && \
    286           $(AUTOMAKE) --foreign  src/Makefile
     286          $(AUTOMAKE) --gnu  src/Makefile
    287287.PRECIOUS: Makefile
    288288Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/branches/updater/src/console/Makefile.in

    r3271 r3273  
    201201          esac; \
    202202        done; \
    203         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/console/Makefile'; \
     203        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/console/Makefile'; \
    204204        cd $(top_srcdir) && \
    205           $(AUTOMAKE) --foreign  src/console/Makefile
     205          $(AUTOMAKE) --gnu  src/console/Makefile
    206206.PRECIOUS: Makefile
    207207Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/branches/updater/src/gui/Makefile.in

    r3271 r3273  
    232232          esac; \
    233233        done; \
    234         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/gui/Makefile'; \
     234        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/gui/Makefile'; \
    235235        cd $(top_srcdir) && \
    236           $(AUTOMAKE) --foreign  src/gui/Makefile
     236          $(AUTOMAKE) --gnu  src/gui/Makefile
    237237.PRECIOUS: Makefile
    238238Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • orxonox/branches/updater/src/gui/orxonox_gui_update.cc

    r3272 r3273  
    200200}
    201201
     202#ifdef HAVE_CURL
    202203CURL* OrxonoxGuiUpdate::curlHandle = NULL;
     204#endif /* HAVE_CURL */
     205
     206#ifdef HAVE_PTHREAD_H
    203207pthread_t* OrxonoxGuiUpdate::downloadThreadID = new pthread_t;
     208#endif /* HAVE_PTHREAD_H */
    204209bool OrxonoxGuiUpdate::isDownloading = false;
    205210
     
    217222  strcpy (fileOnDisk, info->localRoot);
    218223  strcat (fileOnDisk, info->fileName);
    219   pthread_t test;
     224
    220225  if(curlHandle)
    221226    {
     
    234239        {
    235240          //! \todo check if threads really were created.
     241#ifdef HAVE_PTHREAD_H
    236242          pthread_create(downloadThreadID, NULL, downloadThread, info);
     243#else
     244          downloadThread(info);
     245#endif /* HAVE_PTHREAD_H */
     246         
    237247          //      else
    238248          //    PRINTF(1)("thread already in use\n");
     
    252262  if (curlHandle)
    253263    curl_easy_cleanup(curlHandle);
    254 
     264#ifdef HAVE_PTHREAD_H
    255265  pthread_join(*downloadThreadID, NULL);
     266#endif /* HAVE_PTHREAD_H */
    256267  PRINTF(3)("Closing the downloaded file.\n");
    257268  fclose(info->fileHandle);
  • orxonox/branches/updater/src/gui/orxonox_gui_update.h

    r3272 r3273  
    1414#include <curl/easy.h>
    1515#endif /* HAVE_CURL */
     16#ifdef HAVE_PTHREAD_H
    1617#include <pthread.h>
     18#endif /* HAVE_PTHREAD_H */
    1719using namespace std;
    1820
     
    6466  static gint cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar);
    6567#endif /* HAVE_GTK2 */ 
     68#ifdef HAVE_PTHREAD_H
    6669  static pthread_t* downloadThreadID;
     70#endif /* HAVE_PTHREAD_H */
    6771  static bool isDownloading;
    6872
  • orxonox/branches/updater/src/importer/Makefile.in

    r3271 r3273  
    208208          esac; \
    209209        done; \
    210         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign  src/importer/Makefile'; \
     210        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/importer/Makefile'; \
    211211        cd $(top_srcdir) && \
    212           $(AUTOMAKE) --foreign  src/importer/Makefile
     212          $(AUTOMAKE) --gnu  src/importer/Makefile
    213213.PRECIOUS: Makefile
    214214Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
Note: See TracChangeset for help on using the changeset viewer.