~ubuntu-branches/debian/squeeze/protobuf/squeeze

« back to all changes in this revision

Viewing changes to src/gtest/gtest-death-test.cc

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2009-06-02 16:19:00 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090602161900-vm176i3ryt35yk91
Tags: 2.0.3-2.2
* Non-maintainer upload.
* Fix FTBFS from -2.1: don't fail when we can't clean up the java build,
  such as when openjdk isn't installed.
* Disable parallel builds, because libtool is made of fail (if binary-arch
  and build-indep run concurrently, we relink a library while it's being
  used; that doesn't work so well).

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include <errno.h>
38
38
#include <limits.h>
39
39
#include <stdarg.h>
 
40
#include <sched.h>
 
41
 
 
42
#ifdef __ia64__
 
43
extern "C" {
 
44
int  __clone2(int (*fn) (void *arg), void *child_stack_base,
 
45
  size_t child_stack_size, int flags, void *arg,
 
46
  pid_t *parent_tid, void *tls, pid_t *child_tid);
 
47
}
 
48
#endif
40
49
 
41
50
#include <gtest/gtest-message.h>
42
51
#include <gtest/internal/gtest-string.h>
579
588
  void* const stack_top =
580
589
      static_cast<char*>(stack) + (stack_grows_down ? stack_size : 0);
581
590
  ExecDeathTestArgs args = { argv, close_fd };
 
591
#ifdef __ia64__
 
592
  const pid_t child_pid = __clone2(&ExecDeathTestChildMain, stack_top, stack_size,
 
593
                                   SIGCHLD, &args, NULL, NULL, NULL);
 
594
#else
582
595
  const pid_t child_pid = clone(&ExecDeathTestChildMain, stack_top,
583
596
                                SIGCHLD, &args);
 
597
#endif
 
598
 
584
599
  GTEST_DEATH_TEST_CHECK(child_pid != -1);
585
600
  GTEST_DEATH_TEST_CHECK(munmap(stack, stack_size) != -1);
586
601
  return child_pid;