Generify source code
Previously we would fail in some parts of the code if we did not have a premade configuration, now we use any code that was marked as Linux, BSD and Solaris as our basis in order to support building unknown Unix systems.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "util/copyright.h"
|
||||
#if defined(__linux__) || defined(sgi) || defined(CSRG_BASED)
|
||||
#if defined(__linux__) || defined(CSRG_BASED)
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
#include "dbck.h"
|
||||
|
||||
@@ -58,9 +58,6 @@ typedef int Bool;
|
||||
|
||||
extern char *ProgramName;
|
||||
|
||||
#if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
|
||||
extern char *malloc(), *realloc();
|
||||
#endif
|
||||
int process_command(), auth_initialize(), auth_finalize();
|
||||
extern int print_help();
|
||||
extern int verbose;
|
||||
|
||||
@@ -214,11 +214,7 @@ main(int argc, char** argv, char **envp)
|
||||
void install_signal_handler();
|
||||
SVCXPRT *transp;
|
||||
struct sockaddr_in saddr;
|
||||
# if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
||||
socklen_t asize = sizeof(saddr);
|
||||
# else
|
||||
size_t asize = sizeof(saddr);
|
||||
# endif
|
||||
int is_aix = 0;
|
||||
|
||||
int do_garbage_collect = 0;
|
||||
|
||||
@@ -37,13 +37,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#if defined(__linux__) || defined(sun) || defined(CSRG_BASED)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#if !defined(sun)
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
#include <locale.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -33,11 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#include "api/c/api_api.h"
|
||||
#include "Tt/tt_c.h"
|
||||
|
||||
@@ -32,11 +32,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <osfcn.h>
|
||||
#endif
|
||||
#include "Tt/tt_c.h"
|
||||
#include "util/tt_iostream.h"
|
||||
#include "tttar_utils.h"
|
||||
|
||||
Reference in New Issue
Block a user