From b0eb19970a2953e4f689e4d7584e78595ef93622 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sat, 28 May 2011 11:40:36 +0200 Subject: Move bsd_getopt() from to Deprecate . --- include/bsd/getopt.h | 19 ++++--------------- include/bsd/unistd.h | 10 ++++++++++ 2 files changed, 14 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/bsd/getopt.h b/include/bsd/getopt.h index ba2c4eb..697f940 100644 --- a/include/bsd/getopt.h +++ b/include/bsd/getopt.h @@ -1,6 +1,5 @@ /* - * Copyright © 2006 Robert Millan - * Copyright © 2009, 2011 Guillem Jover + * Copyright © 2011 Guillem Jover * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -28,23 +27,13 @@ #ifndef LIBBSD_GETOPT_H #define LIBBSD_GETOPT_H -#include - #ifdef LIBBSD_OVERLAY #include_next +#include #else +#warning "Deprecated header, use or with libbsd-overlay.pc instead." #include +#include #endif -__BEGIN_DECLS -extern int optreset; - -#ifdef LIBBSD_OVERLAY -#undef getopt -#define getopt(argc, argv, optstr) bsd_getopt(argc, argv, optstr) -#endif - -int bsd_getopt (int, char **, char *); -__END_DECLS - #endif diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h index 61aaff4..1c4e579 100644 --- a/include/bsd/unistd.h +++ b/include/bsd/unistd.h @@ -1,4 +1,5 @@ /* + * Copyright © 2006 Robert Millan * Copyright © 2008-2011 Guillem Jover * * Redistribution and use in source and binary forms, with or without @@ -41,6 +42,15 @@ #endif __BEGIN_DECLS +extern int optreset; + +#ifdef LIBBSD_OVERLAY +#undef getopt +#define getopt(argc, argv, optstr) bsd_getopt(argc, argv, optstr) +#endif + +int bsd_getopt(int, char **, char *); + mode_t getmode(const void *set, mode_t mode); void *setmode(const char *mode_str); -- cgit v1.2.3