forked from mirrors/tftp-hpa-google
Prototype cleanup; use "config.h" where appropriate
This commit is contained in:
parent
d9938a7d83
commit
d15a61abe6
5 changed files with 19 additions and 23 deletions
|
@ -62,18 +62,6 @@ int writeit(FILE *, struct tftphdr **, int, int);
|
||||||
extern int segsize;
|
extern int segsize;
|
||||||
#define MAX_SEGSIZE 65464
|
#define MAX_SEGSIZE 65464
|
||||||
|
|
||||||
/*
|
int pick_port_bind(int sockfd, struct sockaddr_in *myaddr, unsigned int from, unsigned int to);
|
||||||
* Prototype for xmalloc/xstrdup
|
|
||||||
*/
|
|
||||||
extern void *xmalloc(size_t);
|
|
||||||
extern char *xstrdup(const char *);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Signal-related stuff
|
|
||||||
*/
|
|
||||||
void (*bsd_signal(int, void (*)(int)))(int);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int pick_port_bind(int sockfd, struct sockaddr_in *myaddr, unsigned int from, unsigned int to);
|
|
||||||
|
|
15
config.h
15
config.h
|
@ -287,6 +287,21 @@ typedef int socklen_t;
|
||||||
#define EOPTNEG 8
|
#define EOPTNEG 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Prototypes for libxtra functions */
|
||||||
|
|
||||||
|
void *xmalloc(size_t);
|
||||||
|
char *xstrdup(const char *);
|
||||||
|
|
||||||
|
#ifndef HAVE_BSD_SIGNAL
|
||||||
|
void (*bsd_signal(int, void (*)(int)))(int);
|
||||||
|
#endif
|
||||||
|
#ifndef HAVE_DUP2
|
||||||
|
int dup2(int, int);
|
||||||
|
#endif
|
||||||
|
#ifndef HAVE_DAEMON
|
||||||
|
int daemon(int, int);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* tftp-hpa version and configuration strings */
|
/* tftp-hpa version and configuration strings */
|
||||||
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
|
@ -4,11 +4,7 @@
|
||||||
* Use sigaction() to simulate BSD signal()
|
* Use sigaction() to simulate BSD signal()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <signal.h>
|
#include "config.h"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
void (*bsd_signal(int, void (*)(int)))(int);
|
|
||||||
|
|
||||||
void (*bsd_signal(int signum, void (*handler)(int)))(int)
|
void (*bsd_signal(int signum, void (*handler)(int)))(int)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include "config.h"
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
void *xmalloc(size_t size)
|
void *xmalloc(size_t size)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include "config.h"
|
||||||
#include <string.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
char *xstrdup(const char *s)
|
char *xstrdup(const char *s)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue