Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boinc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
boinc
Commits
62051719
Commit
62051719
authored
15 years ago
by
Rom Walton
Browse files
Options
Downloads
Patches
Plain Diff
- client: cleanup formatting of linux platform detection code.
client/ cs_platforms.cpp svn path=/trunk/boinc/; revision=19384
parent
6c6f8cd3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
checkin_notes
+6
-0
6 additions, 0 deletions
checkin_notes
client/cs_platforms.cpp
+41
-40
41 additions, 40 deletions
client/cs_platforms.cpp
with
47 additions
and
40 deletions
checkin_notes
+
6
−
0
View file @
62051719
...
...
@@ -8790,3 +8790,9 @@ Charlie 26 Oct 2009
clientgui/
sg_BoincSimpleGUI.cpp, .h
Rom 26 Oct 2009
- client: cleanup formatting of linux platform detection code.
client/
cs_platforms.cpp
This diff is collapsed.
Click to expand it.
client/cs_platforms.cpp
+
41
−
40
View file @
62051719
...
...
@@ -118,6 +118,7 @@ void CLIENT_STATE::detect_platforms() {
do
{
if
(
boinc_file_exists
(
uname
[
eno
]))
break
;
}
while
(
uname
[
++
eno
]
!=
0
);
// run it and check the kernel machine architecture.
if
(
uname
[
eno
]
!=
0
)
{
strlcpy
(
cmdline
,
uname
[
eno
],
256
);
...
...
@@ -129,6 +130,7 @@ void CLIENT_STATE::detect_platforms() {
}
pclose
(
f
);
}
if
(
!
support64
)
{
// we're running on a 32 bit kernel, so we will assume
// we are i686-pc-linux-gnu only.
...
...
@@ -148,12 +150,12 @@ void CLIENT_STATE::detect_platforms() {
const
char
*
libdir
[]
=
{
"/lib"
,
"/lib32"
,
"/lib/32"
,
"/usr/lib"
,
"/usr/lib32"
,
"/usr/lib/32"
};
const
int
nlibdirs
=
sizeof
(
libdir
)
/
sizeof
(
char
*
);
// find 'file'
eno
=
0
;
do
{
if
(
boinc_file_exists
(
file
[
eno
]))
break
;
}
while
(
file
[
++
eno
]
!=
0
);
// now try to find a 32-bit C library.
if
(
file
[
eno
]
!=
0
)
{
int
i
;
...
...
@@ -169,13 +171,13 @@ void CLIENT_STATE::detect_platforms() {
strlcat
(
cmdline
,
libdir
[
i
],
256
);
strlcat
(
cmdline
,
"/"
,
256
);
strlcat
(
cmdline
,
entry
->
d_name
,
256
);
if
((
f
=
popen
(
cmdline
,
"r"
)))
{
f
=
popen
(
cmdline
,
"r"
);
if
(
f
)
{
while
(
!
std
::
feof
(
f
))
{
fgets
(
cmdline
,
256
,
f
);
// If the library is 32-bit ELF, then we're
// golden.
if
(
strstr
(
cmdline
,
"ELF"
)
&&
strstr
(
cmdline
,
"32-bit"
))
support32
=
1
;
if
(
strstr
(
cmdline
,
"ELF"
)
&&
strstr
(
cmdline
,
"32-bit"
))
support32
=
1
;
}
pclose
(
f
);
}
...
...
@@ -186,7 +188,6 @@ void CLIENT_STATE::detect_platforms() {
}
#endif
}
}
if
(
support64
)
{
add_platform
(
"x86_64-pc-linux-gnu"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment