Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / tests / Bug_3500_Regression_Test.cpp
blob121269d15669c9117a5edba38c5c20b3efaf9cb9
1 /**
2 * @file Bug_3500_Regression_Test.cpp
4 * Reproduces the problems reported in bug 3500:
5 * http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3500
7 * @author Bill Rizzi <rizzi@softserv.com>
8 */
10 #include "ace/OS_NS_sys_mman.h"
11 #include "ace/SString.h"
12 #include "test_config.h"
14 int
15 run_main (int, ACE_TCHAR *[])
17 ACE_START_TEST (ACE_TEXT ("Bug_3500_Regression_Test"));
19 int ret = 0;
21 #if defined(ACE_WIN32) && !defined (ACE_LACKS_MMAP)
22 ACE_HANDLE handle = ACE_INVALID_HANDLE;
23 ACE_TString name(ACE_TEXT ("Bug3500"));
25 void *mmap =
26 ACE_OS::mmap(0, // addr
27 28, // len
28 PAGE_READWRITE, // prot
29 MAP_SHARED, // flags
30 ACE_INVALID_HANDLE, // file_handle
31 0, // off
32 &handle, // file_mapping
33 0, // sa
34 name.c_str()); // shared memory name
36 if (mmap == MAP_FAILED)
38 ret = -1;
40 #endif
42 if (0 != ret)
44 ACE_ERROR ((LM_ERROR,
45 ACE_TEXT ("ACE_OS::mmap() %p\n"),
46 ACE_TEXT ("failed")));
49 ACE_END_TEST;
51 return 0;