repo.or.cz
/
ACE_TAO.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Changes to attempt to silence bcc64x
[ACE_TAO.git]
/
ACE
/
bin
/
Uniqueid.pm
blob
3e453a4695d28150e3c8076108448f868a647b32
1
#!/usr/bin/env perl
2
sub
uniqueid
3
{
4
if
($^
O
eq
"MSWin32"
)
5
{
6
my
$uid
=
1
;
7
8
open
(
IPNUM
,
"ipconfig|"
) ||
die
"Can't run ipconfig: $!
\n
"
;
9
10
while
(<
IPNUM
>)
11
{
12
if
(
/Address/
)
13
{
14
$uid
= (
split
(
/: (\d+)\.(\d+)\.(\d+)\.(\d+)/
))[
4
];
15
}
16
}
17
18
close
IPNUM
;
19
20
return
$uid
;
21
}
22
else
23
{
24
return
getpwnam
(
getlogin
());
25
}
26
}
27
28
1
;