summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2011-05-19 09:58:09 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-05-23 10:57:44 -0400
commit324fb26ba803a999bedc29e93c46c84f27abf5b7 (patch)
treed504009cdf1377ab791f69706c4e77f755ea65ad /src
parent7bdaf2a712d73763e7c3d25f6bb544b18f7028eb (diff)
downloadsssd-324fb26ba803a999bedc29e93c46c84f27abf5b7.tar.gz
sssd-324fb26ba803a999bedc29e93c46c84f27abf5b7.tar.xz
sssd-324fb26ba803a999bedc29e93c46c84f27abf5b7.zip
Set _GNU_SOURCE globally
Diffstat (limited to 'src')
-rw-r--r--src/confdb/confdb.c3
-rw-r--r--src/external/platform.m43
-rw-r--r--src/krb5_plugin/sssd_krb5_locator_plugin.c4
-rw-r--r--src/monitor/monitor.c1
-rw-r--r--src/responder/common/responder_common.c4
-rw-r--r--src/sss_client/common.c4
-rw-r--r--src/sss_client/pam_sss.c4
-rw-r--r--src/tools/selinux.c1
-rw-r--r--src/util/crypto/libcrypto/crypto_sha512crypt.c1
-rw-r--r--src/util/crypto/nss/nss_obfuscate.c4
-rw-r--r--src/util/crypto/nss/nss_sha512crypt.c3
-rw-r--r--src/util/debug.c3
-rw-r--r--src/util/server.c1
13 files changed, 13 insertions, 23 deletions
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index 87d33f9bd..3f668dd3d 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -19,10 +19,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define _GNU_SOURCE
+#include "config.h"
#include <ctype.h>
-#include "config.h"
#include "util/util.h"
#include "confdb/confdb.h"
#include "confdb/confdb_private.h"
diff --git a/src/external/platform.m4 b/src/external/platform.m4
index 051fe0765..c67e08144 100644
--- a/src/external/platform.m4
+++ b/src/external/platform.m4
@@ -37,8 +37,7 @@ AM_CONDITIONAL([HAVE_DEBIAN], [test x"$osname" = xdebian])
AM_CONDITIONAL([HAVE_GENTOO], [test x"$osname" = xgentoo])
AC_CHECK_MEMBERS([struct ucred.pid, struct ucred.uid, struct ucred.gid], , ,
- [[#define _GNU_SOURCE
- #include <sys/socket.h>]])
+ [[#include <sys/socket.h>]])
if test x"$ac_cv_member_struct_ucred_pid" = xyes -a \
x"$ac_cv_member_struct_ucred_uid" = xyes -a \
diff --git a/src/krb5_plugin/sssd_krb5_locator_plugin.c b/src/krb5_plugin/sssd_krb5_locator_plugin.c
index a4dc31cb5..d6e90a747 100644
--- a/src/krb5_plugin/sssd_krb5_locator_plugin.c
+++ b/src/krb5_plugin/sssd_krb5_locator_plugin.c
@@ -17,7 +17,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define _GNU_SOURCE
+
+#include "config.h"
+
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 59ffeb3b4..5559bd9ab 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -19,7 +19,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/time.h>
diff --git a/src/responder/common/responder_common.c b/src/responder/common/responder_common.c
index 37761ae9a..c8647e01a 100644
--- a/src/responder/common/responder_common.c
+++ b/src/responder/common/responder_common.c
@@ -19,8 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* for struct ucred */
-#define _GNU_SOURCE
+#include "config.h"
#include <stdio.h>
#include <unistd.h>
@@ -33,7 +32,6 @@
#include <sys/time.h>
#include <errno.h>
#include <popt.h>
-#include "config.h"
#include "util/util.h"
#include "db/sysdb.h"
#include "confdb/confdb.h"
diff --git a/src/sss_client/common.c b/src/sss_client/common.c
index c8a951597..b60330559 100644
--- a/src/sss_client/common.c
+++ b/src/sss_client/common.c
@@ -23,8 +23,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* for struct ucred */
-#define _GNU_SOURCE
+#include "config.h"
#include <nss.h>
#include <security/pam_modules.h>
@@ -43,7 +42,6 @@
#include <libintl.h>
#define _(STRING) dgettext (PACKAGE, STRING)
-#include "config.h"
#include "sss_cli.h"
#if HAVE_PTHREAD
diff --git a/src/sss_client/pam_sss.c b/src/sss_client/pam_sss.c
index 66de232d5..d54c0251f 100644
--- a/src/sss_client/pam_sss.c
+++ b/src/sss_client/pam_sss.c
@@ -24,10 +24,6 @@
#define PAM_SM_SESSION
#define PAM_SM_PASSWORD
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
diff --git a/src/tools/selinux.c b/src/tools/selinux.c
index 647fc17a5..45672d1bb 100644
--- a/src/tools/selinux.c
+++ b/src/tools/selinux.c
@@ -21,7 +21,6 @@
#include "config.h"
-#define _GNU_SOURCE
#include <stdio.h>
#ifdef HAVE_SELINUX
diff --git a/src/util/crypto/libcrypto/crypto_sha512crypt.c b/src/util/crypto/libcrypto/crypto_sha512crypt.c
index 29900cc9c..50734318c 100644
--- a/src/util/crypto/libcrypto/crypto_sha512crypt.c
+++ b/src/util/crypto/libcrypto/crypto_sha512crypt.c
@@ -10,7 +10,6 @@
/* SHA512-based Unix crypt implementation.
Released into the Public Domain by Ulrich Drepper <drepper@redhat.com>. */
-#define _GNU_SOURCE
#include <endian.h>
#include <errno.h>
#include <limits.h>
diff --git a/src/util/crypto/nss/nss_obfuscate.c b/src/util/crypto/nss/nss_obfuscate.c
index bd8688e65..cbd8984a2 100644
--- a/src/util/crypto/nss/nss_obfuscate.c
+++ b/src/util/crypto/nss/nss_obfuscate.c
@@ -183,13 +183,13 @@ done:
static int nss_encrypt_decrypt_init(TALLOC_CTX *mem_ctx,
struct crypto_mech_data *mech_props,
- bool encrypt,
+ bool do_encrypt,
struct sss_nss_crypto_ctx *cctx)
{
CK_ATTRIBUTE_TYPE op;
int ret;
- op = encrypt ? CKA_ENCRYPT : CKA_DECRYPT;
+ op = do_encrypt ? CKA_ENCRYPT : CKA_DECRYPT;
/* turn the raw key into a key object */
cctx->keyobj = PK11_ImportSymKey(cctx->slot, mech_props->cipher,
diff --git a/src/util/crypto/nss/nss_sha512crypt.c b/src/util/crypto/nss/nss_sha512crypt.c
index 514e4d9a3..76eb8a635 100644
--- a/src/util/crypto/nss/nss_sha512crypt.c
+++ b/src/util/crypto/nss/nss_sha512crypt.c
@@ -8,7 +8,8 @@
/* SHA512-based Unix crypt implementation.
Released into the Public Domain by Ulrich Drepper <drepper@redhat.com>. */
-#define _GNU_SOURCE
+#include "config.h"
+
#include <endian.h>
#include <errno.h>
#include <limits.h>
diff --git a/src/util/debug.c b/src/util/debug.c
index dbd54c1e9..18bfda428 100644
--- a/src/util/debug.c
+++ b/src/util/debug.c
@@ -19,7 +19,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define _GNU_SOURCE
+#include "config.h"
+
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
diff --git a/src/util/server.c b/src/util/server.c
index e12623738..d33c5cb15 100644
--- a/src/util/server.c
+++ b/src/util/server.c
@@ -23,7 +23,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>