Ignore:
Timestamp:
Oct 2, 2014, 1:13:59 AM (11 years ago)
Author:
dmik
Message:

icedtea-web: Adapt 1.5.1 changes to OS/2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/icedtea-web/plugin/icedteanp/IcedTeaNPPlugin.cc

    r429 r431  
    221221
    222222#ifdef __OS2__
    223 struct QueueProcessorData
    224 {
    225     PluginRequestProcessor *processor;
    226     bool stopRequested;
    227 };
    228 
    229223static QueueProcessorData queue_processor_data1 = { NULL, false };
    230224static QueueProcessorData queue_processor_data2 = { NULL, false };
     
    314308            }
    315309      }
     310#ifdef __OS2___
     311      custom_jre = icedtea_web_jre_dir();
     312      if (custom_jre.length())
     313          return custom_jre+"/bin/java";
     314#endif
    316315      return appletviewer_default_executable;     
    317316}
     
    327326            }
    328327      }
    329       return appletviewer_default_rtjar;     
     328#ifdef __OS2___
     329      custom_jre = icedtea_web_jre_dir();
     330      if (custom_jre.length())
     331          return custom_jre+"/lib/rt.jar";
     332#endif
     333      return appletviewer_default_rtjar;
    330334}
    331335
     
    513517  if (socketpair (AF_LOCAL, SOCK_STREAM, 0, in_pipe) == -1)
    514518    {
    515       PLUGIN_ERROR_TWO ("Failed to create input pipe", strerror (errno));
     519      PLUGIN_ERROR ("Failed to create input pipe", strerror (errno));
    516520      np_error = NPERR_GENERIC_ERROR;
    517521      goto cleanup_in_pipe;
     
    550554  if (socketpair (AF_LOCAL, SOCK_STREAM, 0, out_pipe) == -1)
    551555    {
    552       PLUGIN_ERROR_TWO ("Failed to create output pipe", strerror (errno));
     556      PLUGIN_ERROR ("Failed to create output pipe", strerror (errno));
    553557      np_error = NPERR_GENERIC_ERROR;
    554558      goto cleanup_out_pipe;
     
    15941598  }
    15951599
     1600#ifdef __OS2__
     1601  {
     1602    std::string path = PLUGIN_BOOTCLASSPATH;
     1603    static const std::string datadir = "@DATADIR@";
     1604    size_t pos = 0;
     1605    while ((pos = path.find(datadir, pos)) != std::string::npos) {
     1606      path.replace(pos, datadir.length(), icedtea_web_data_dir());
     1607      pos += datadir.length();
     1608    }
     1609    command_line.push_back(path);
     1610  }
     1611#else
    15961612  command_line.push_back(PLUGIN_BOOTCLASSPATH);
     1613#endif
    15971614  // set the classpath to avoid using the default (cwd).
    15981615  command_line.push_back("-classpath");
     
    16171634  command_line.push_back("sun.applet.PluginMain");
    16181635#ifdef __OS2__
    1619   command_line.push_back((std::ostrstream() << out_pipe[1]).str());
    1620   command_line.push_back((std::ostrstream() << in_pipe[1]).str());
     1636  command_line.push_back(static_cast<std::ostringstream &>(std::ostringstream() << out_pipe[1]).str());
     1637  command_line.push_back(static_cast<std::ostringstream &>(std::ostringstream() << in_pipe[1]).str());
    16211638#else
    16221639  command_line.push_back(out_pipe_name);
     
    24432460
    24442461#ifdef __OS2__
    2445   // pthread_cancel() isn't implemented on OS?2, so use an old good flag
     2462  // pthread_cancel() isn't implemented on OS/2, so use an old good flag
    24462463  queue_processor_data1.stopRequested = true;
    24472464  queue_processor_data2.stopRequested = true;
    24482465  queue_processor_data3.stopRequested = true;
    2449   pthread_cond_broadcast(&cond_message_available);
     2466  plugin_req_proc->cancelWait();
    24502467#else
    24512468  pthread_cancel(plugin_request_processor_thread1);
Note: See TracChangeset for help on using the changeset viewer.