Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
23e6d4a5
Commit
23e6d4a5
authored
Feb 24, 2011
by
Janne Blomqvist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PR 47802 Test for POSIX getpwuid_r
From-SVN: r170471
parent
e3d590af
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
2 deletions
+84
-2
libgfortran/ChangeLog
+9
-0
libgfortran/config.h.in
+3
-0
libgfortran/configure
+50
-0
libgfortran/configure.ac
+20
-0
libgfortran/intrinsics/getlog.c
+2
-2
No files found.
libgfortran/ChangeLog
View file @
23e6d4a5
2011-02-24 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/47802
* configure.ac: Add test for POSIX getpwuid_r.
* intrinsics/getlog.c (getlog): CPP test for
HAVE_POSIX_GETPWUID_R.
* config.h.in: Regenerated.
* configure: Regenerated.
2011-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/47567
...
...
libgfortran/config.h.in
View file @
23e6d4a5
...
...
@@ -624,6 +624,9 @@
/* Define to 1 if you have the `pipe' function. */
#undef HAVE_PIPE
/* Define to 1 if we have POSIX getpwuid_r which takes 5 arguments. */
#undef HAVE_POSIX_GETPWUID_R
/* libm includes pow */
#undef HAVE_POW
...
...
libgfortran/configure
View file @
23e6d4a5
...
...
@@ -25428,6 +25428,56 @@ FPU_HOST_HEADER=config/${fpu_host}.h
IEEE_FLAGS
=
"
${
ieee_flags
}
"
# Check for POSIX getpwuid_r
#
# There are two versions of getpwuid_r, the POSIX one with 5
# arguments, and another one with 4 arguments used by at least HP-UX
# 10.2.
if
test
"
$ac_cv_func_getpwuid_r
"
=
"yes"
;
then
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking POSIX version of getpwuid_r with 5 arguments"
>
&5
$as_echo_n
"checking POSIX version of getpwuid_r with 5 arguments... "
>
&6
;
}
if
test
"
${
libgfor_cv_posix_getpwuid_r
+set
}
"
=
set
;
then
:
$as_echo_n
"(cached) "
>
&6
else
if
test
x
$gcc_no_link
=
xyes
;
then
as_fn_error
"Link tests are not allowed after GCC_NO_EXECUTABLES."
"
$LINENO
"
5
fi
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
#include <stdio.h>
#include <sys/types.h>
#include <pwd.h>
int
main ()
{
getpwuid_r(0, NULL, NULL, 0, NULL);
;
return 0;
}
_ACEOF
if
ac_fn_c_try_link
"
$LINENO
"
;
then
:
libgfor_cv_posix_getpwuid_r
=
"yes"
else
libgfor_cv_posix_getpwuid_r
=
"no"
fi
rm
-f
core conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$libgfor_cv_posix_getpwuid_r
"
>
&5
$as_echo
"
$libgfor_cv_posix_getpwuid_r
"
>
&6
;
}
fi
if
test
"
$libgfor_cv_posix_getpwuid_r
"
=
"yes"
;
then
$as_echo
"#define HAVE_POSIX_GETPWUID_R 1"
>>
confdefs.h
fi
# Check out attribute support.
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether the target supports hidden visibility"
>
&5
...
...
libgfortran/configure.ac
View file @
23e6d4a5
...
...
@@ -513,6 +513,26 @@ AC_SUBST(FPU_HOST_HEADER)
IEEE_FLAGS="${ieee_flags}"
AC_SUBST(IEEE_FLAGS)
# Check for POSIX getpwuid_r
#
# There are two versions of getpwuid_r, the POSIX one with 5
# arguments, and another one with 4 arguments used by at least HP-UX
# 10.2.
if test "$ac_cv_func_getpwuid_r" = "yes"; then
AC_CACHE_CHECK([POSIX version of getpwuid_r with 5 arguments], libgfor_cv_posix_getpwuid_r, [
AC_LINK_IFELSE([AC_LANG_PROGRAM([
#include <stdio.h>
#include <sys/types.h>
#include <pwd.h>], [
getpwuid_r(0, NULL, NULL, 0, NULL);
])], [libgfor_cv_posix_getpwuid_r="yes"], [libgfor_cv_posix_getpwuid_r="no"])])
fi
if test "$libgfor_cv_posix_getpwuid_r" = "yes"; then
AC_DEFINE([HAVE_POSIX_GETPWUID_R], [1], [Define to 1 if we have POSIX getpwuid_r which takes 5 arguments.])
fi
# Check out attribute support.
LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY
LIBGFOR_CHECK_ATTRIBUTE_DLLEXPORT
...
...
libgfortran/intrinsics/getlog.c
View file @
23e6d4a5
...
...
@@ -75,7 +75,7 @@ PREFIX(getlog) (char * login, gfc_charlen_type login_len)
memset
(
login
,
' '
,
login_len
);
/* Blank the string. */
#if defined(HAVE_GETPWUID_R) && defined(HAVE_GETEUID)
#if defined(HAVE_
POSIX_
GETPWUID_R) && defined(HAVE_GETEUID)
struct
passwd
pwd
;
struct
passwd
*
result
;
char
*
buf
;
...
...
@@ -113,7 +113,7 @@ PREFIX(getlog) (char * login, gfc_charlen_type login_len)
memcpy
(
login
,
p
,
p_len
);
cleanup:
#if
def HAVE_GETPWUID_R
#if
defined (HAVE_POSIX_GETPWUID_R) && defined(HAVE_GETEUID)
free
(
buf
);
#else
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment