summaryrefslogtreecommitdiff
path: root/ACE/bin/envinfo.cpp
blob: 7a727d088188fee8743db4f9edb8408fb6213ac0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// $Id$

#include "ace/ACE.h"
#include "ace/Log_Msg.h"
#include "ace/OS_main.h"
#include "ace/OS_NS_sys_utsname.h"

ACE_RCSID(bin, envinfo, "$Id$")

int
ACE_TMAIN (int, ACE_TCHAR *[])
{
  ACE_DEBUG ((LM_INFO, ACE_TEXT ("ACE: %u.%u.%u\n"),
              ACE::major_version(),
              ACE::minor_version(),
              ACE::beta_version()));

  ACE_utsname uname;
  ACE_OS::uname(&uname);
#if defined (ACE_LACKS_UTSNAME_T)
  ACE_DEBUG ((LM_INFO,
              ACE_TEXT ("OS: %s %s\n"),
              uname.sysname,
              uname.release));
#else
  ACE_DEBUG ((LM_INFO,
              ACE_TEXT ("OS: %C %C\n"),
              uname.sysname,
              uname.release));
#endif

  ACE_DEBUG ((LM_INFO, ACE_TEXT ("Compiler: %s %u.%u\n"),
              ACE::compiler_name(),
              ACE::compiler_major_version(),
              ACE::compiler_minor_version(),
              ACE::compiler_beta_version()));

  return 0;
}