Fixed issue #44.
Removed unnesessary include <sys/types.h> from stdio.h, stdlib.h, string.h, strings.h and time.h.
This commit is contained in:
@@ -1,8 +1,22 @@
|
|||||||
|
#ifndef _STDDEF_H_
|
||||||
|
#define _STDDEF_H_
|
||||||
|
|
||||||
|
typedef int ptrdiff_t;
|
||||||
|
|
||||||
|
#ifndef _SIZE_T
|
||||||
|
#define _SIZE_T
|
||||||
|
typedef unsigned size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef NULL
|
||||||
|
#define NULL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Offset of member MEMBER in a struct of type TYPE. */
|
/* Offset of member MEMBER in a struct of type TYPE. */
|
||||||
|
|
||||||
#if defined(__GNUC__) && __GNUC__ > 3
|
#if defined(__GNUC__) && __GNUC__ > 3
|
||||||
#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
|
#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
|
||||||
#else
|
#else
|
||||||
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE*)0)->MEMBER)
|
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE*)0)->MEMBER)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* _STDDEF_H_ */
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef FILE
|
#ifndef FILE
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#define BUFSIZ 1024
|
#define BUFSIZ 1024
|
||||||
extern struct _iobuf {
|
extern struct _iobuf {
|
||||||
int _cnt;
|
int _cnt;
|
||||||
@@ -40,6 +38,11 @@ extern struct _iobuf {
|
|||||||
#define NULL 0
|
#define NULL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SIZE_T
|
||||||
|
#define _SIZE_T
|
||||||
|
typedef unsigned size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
#define FILE struct _iobuf
|
#define FILE struct _iobuf
|
||||||
#define EOF (-1)
|
#define EOF (-1)
|
||||||
|
|
||||||
|
|||||||
@@ -43,8 +43,6 @@
|
|||||||
#ifndef _STDLIB_H_
|
#ifndef _STDLIB_H_
|
||||||
#define _STDLIB_H_
|
#define _STDLIB_H_
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#endif
|
#endif
|
||||||
@@ -54,6 +52,11 @@
|
|||||||
|
|
||||||
#define RAND_MAX 0x7fff
|
#define RAND_MAX 0x7fff
|
||||||
|
|
||||||
|
#ifndef _SIZE_T
|
||||||
|
#define _SIZE_T
|
||||||
|
typedef unsigned size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
void abort (void);
|
void abort (void);
|
||||||
int abs (int);
|
int abs (int);
|
||||||
int atexit (void (*)(void));
|
int atexit (void (*)(void));
|
||||||
@@ -83,7 +86,7 @@ char *_findenv (const char *name, int *offset);
|
|||||||
void *alloca (size_t size);
|
void *alloca (size_t size);
|
||||||
|
|
||||||
int daemon (int, int);
|
int daemon (int, int);
|
||||||
char *devname (dev_t dev, mode_t type);
|
char *devname (int dev, int type);
|
||||||
int getloadavg (unsigned loadavg[], int nelem);
|
int getloadavg (unsigned loadavg[], int nelem);
|
||||||
|
|
||||||
extern char *suboptarg; /* getsubopt(3) external variable */
|
extern char *suboptarg; /* getsubopt(3) external variable */
|
||||||
|
|||||||
@@ -3,12 +3,15 @@
|
|||||||
* All rights reserved. The Berkeley software License Agreement
|
* All rights reserved. The Berkeley software License Agreement
|
||||||
* specifies the terms and conditions for redistribution.
|
* specifies the terms and conditions for redistribution.
|
||||||
*/
|
*/
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SIZE_T
|
||||||
|
#define _SIZE_T
|
||||||
|
typedef unsigned size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
char *strcat (char *, const char *);
|
char *strcat (char *, const char *);
|
||||||
char *strncat (char *, const char *, size_t);
|
char *strncat (char *, const char *, size_t);
|
||||||
char *strcpy (char *, const char *);
|
char *strcpy (char *, const char *);
|
||||||
|
|||||||
@@ -30,7 +30,10 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
#include <sys/types.h>
|
#ifndef _SIZE_T
|
||||||
|
#define _SIZE_T
|
||||||
|
typedef unsigned size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
int bcmp(const void *, const void *, size_t);
|
int bcmp(const void *, const void *, size_t);
|
||||||
void bcopy(const void *, void *, size_t);
|
void bcopy(const void *, void *, size_t);
|
||||||
|
|||||||
@@ -6,7 +6,15 @@
|
|||||||
#ifndef _TIME_H
|
#ifndef _TIME_H
|
||||||
#define _TIME_H
|
#define _TIME_H
|
||||||
|
|
||||||
#include <sys/types.h> /* for time_t */
|
#ifndef _TIME_T
|
||||||
|
#define _TIME_T
|
||||||
|
typedef long time_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _SIZE_T
|
||||||
|
#define _SIZE_T
|
||||||
|
typedef unsigned size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Structure returned by gmtime and localtime calls (see ctime(3)).
|
* Structure returned by gmtime and localtime calls (see ctime(3)).
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <grp.h>
|
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -14,6 +13,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
|
#include <grp.h>
|
||||||
|
|
||||||
char userbuf[64] = "USER=";
|
char userbuf[64] = "USER=";
|
||||||
char homebuf[128] = "HOME=";
|
char homebuf[128] = "HOME=";
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
|
|
||||||
#define MAXGRP 200
|
#define MAXGRP 200
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
#ifndef _STAT_H_
|
#ifndef _STAT_H_
|
||||||
#define _STAT_H_
|
#define _STAT_H_
|
||||||
|
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
struct stat
|
struct stat
|
||||||
{
|
{
|
||||||
dev_t st_dev;
|
dev_t st_dev;
|
||||||
|
|||||||
@@ -50,7 +50,10 @@ typedef int ssize_t;
|
|||||||
#define _SSIZE_T
|
#define _SSIZE_T
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
typedef long time_t;
|
#ifndef _TIME_T
|
||||||
|
#define _TIME_T
|
||||||
|
typedef long time_t;
|
||||||
|
#endif
|
||||||
typedef int dev_t;
|
typedef int dev_t;
|
||||||
#ifndef _OFF_T
|
#ifndef _OFF_T
|
||||||
#define _OFF_T
|
#define _OFF_T
|
||||||
|
|||||||
Reference in New Issue
Block a user