[Cmake-commits] [cmake-commits] king committed archive_read_disk_set_standard_lookup.c 1.2 1.3 archive_write_disk_set_standard_lookup.c 1.2 1.3
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Nov 5 16:29:16 EST 2009
Update of /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive
In directory public:/mounts/ram/cvs-serv13475/Utilities/cmlibarchive/libarchive
Modified Files:
archive_read_disk_set_standard_lookup.c
archive_write_disk_set_standard_lookup.c
Log Message:
libarchive: Define _XOPEN_SOURCE for get(pwu|grg)id_r
The commit "Fixed a few of the SunOS build errors in libarchive" changed
the call to these functions to use the old signatures. Instead we now
define _XOPEN_SOURCE to get the improved modern signatures.
Index: archive_read_disk_set_standard_lookup.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_read_disk_set_standard_lookup.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** archive_read_disk_set_standard_lookup.c 5 Nov 2009 18:40:06 -0000 1.2
--- archive_read_disk_set_standard_lookup.c 5 Nov 2009 21:29:07 -0000 1.3
***************
*** 24,27 ****
--- 24,31 ----
*/
+ #ifndef _XOPEN_SOURCE
+ # define _XOPEN_SOURCE 500 /* getpwuid_r and getgrgid_r signatures */
+ #endif
+
#include "archive_platform.h"
__FBSDID("$FreeBSD$");
***************
*** 187,191 ****
{
struct passwd pwent, *result;
! int r = 0;
if (cache->buff_size == 0) {
--- 191,195 ----
{
struct passwd pwent, *result;
! int r;
if (cache->buff_size == 0) {
***************
*** 196,205 ****
return (NULL);
for (;;) {
- #if defined(__sun)
- result = getpwuid_r((uid_t)id, &pwent, cache->buff, cache->buff_size);
- #else
r = getpwuid_r((uid_t)id, &pwent,
cache->buff, cache->buff_size, &result);
- #endif
if (r == 0)
break;
--- 200,205 ----
***************
*** 239,243 ****
{
struct group grent, *result;
! int r = 0;
if (cache->buff_size == 0) {
--- 239,243 ----
{
struct group grent, *result;
! int r;
if (cache->buff_size == 0) {
***************
*** 248,257 ****
return (NULL);
for (;;) {
- #if defined(__sun)
- result = getgrgid_r((gid_t)id, &grent, cache->buff, cache->buff_size);
- #else
r = getgrgid_r((gid_t)id, &grent,
cache->buff, cache->buff_size, &result);
- #endif
if (r == 0)
break;
--- 248,253 ----
Index: archive_write_disk_set_standard_lookup.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_write_disk_set_standard_lookup.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** archive_write_disk_set_standard_lookup.c 5 Nov 2009 18:40:06 -0000 1.2
--- archive_write_disk_set_standard_lookup.c 5 Nov 2009 21:29:10 -0000 1.3
***************
*** 24,27 ****
--- 24,31 ----
*/
+ #ifndef _XOPEN_SOURCE
+ # define _XOPEN_SOURCE 500 /* getpwuid_r and getgrgid_r signatures */
+ #endif
+
#include "archive_platform.h"
__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_disk_set_standard_lookup.c,v 1.4 2007/05/29 01:00:19 kientzle Exp $");
***************
*** 123,134 ****
char *buffer = _buffer;
struct group grent, *result;
! int r = 0;
for (;;) {
- #if defined(__sun)
- result = getgrnam_r(gname, &grent, buffer, bufsize);
- #else
r = getgrnam_r(gname, &grent, buffer, bufsize, &result);
- #endif
if (r == 0)
break;
--- 127,134 ----
char *buffer = _buffer;
struct group grent, *result;
! int r;
for (;;) {
r = getgrnam_r(gname, &grent, buffer, bufsize, &result);
if (r == 0)
break;
***************
*** 186,197 ****
char *buffer = _buffer;
struct passwd pwent, *result;
! int r = 0;
for (;;) {
- #if defined(__sun)
- result = getpwnam_r(uname, &pwent, buffer, bufsize);
- #else
r = getpwnam_r(uname, &pwent, buffer, bufsize, &result);
- #endif
if (r == 0)
break;
--- 186,193 ----
char *buffer = _buffer;
struct passwd pwent, *result;
! int r;
for (;;) {
r = getpwnam_r(uname, &pwent, buffer, bufsize, &result);
if (r == 0)
break;
More information about the Cmake-commits
mailing list