From: Jim Meyering Date: Sat, 23 Dec 2006 21:31:59 +0000 (+0000) Subject: * lib/safe-read.h [C++]: Wrap declarations in extern "C". X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5491309db38697aec7b44483fce2f1e75838e2c5;p=pspp * lib/safe-read.h [C++]: Wrap declarations in extern "C". From Bruno Haible. --- diff --git a/ChangeLog b/ChangeLog index a00a191d2b..1149ee45b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-12-23 Bruno Haible + + * lib/safe-read.h [C++]: Wrap declarations in extern "C". + 2006-12-23 Bruno Haible * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of diff --git a/lib/safe-read.h b/lib/safe-read.h index 9f8a59bd4f..3451955ad4 100644 --- a/lib/safe-read.h +++ b/lib/safe-read.h @@ -1,5 +1,5 @@ /* An interface to read() that retries after interrupts. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,9 +17,19 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + + #define SAFE_READ_ERROR ((size_t) -1) /* Read up to COUNT bytes at BUF from descriptor FD, retrying if interrupted. Return the actual number of bytes read, zero for EOF, or SAFE_READ_ERROR upon error. */ extern size_t safe_read (int fd, void *buf, size_t count); + + +#ifdef __cplusplus +} +#endif