|
Revision 2, 2.5 kB
(checked in by nextime, 2 years ago)
|
Initial import, branching from morphix svn
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
#ifndef __PORTABLE_H |
|---|
| 22 |
#define __PORTABLE_H |
|---|
| 23 |
|
|---|
| 24 |
#ifdef __cplusplus |
|---|
| 25 |
extern "C" { |
|---|
| 26 |
#endif |
|---|
| 27 |
|
|---|
| 28 |
#ifdef HAVE_CONFIG_H |
|---|
| 29 |
#include <config.h> |
|---|
| 30 |
#endif |
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
|
|---|
| 35 |
#if HAVE_GETOPT_H |
|---|
| 36 |
#include <getopt.h> |
|---|
| 37 |
#endif |
|---|
| 38 |
|
|---|
| 39 |
#if HAVE_UNISTD_H |
|---|
| 40 |
#include <unistd.h> |
|---|
| 41 |
#endif |
|---|
| 42 |
|
|---|
| 43 |
#if !HAVE_GETOPT |
|---|
| 44 |
int getopt(int argc, char * const *argv, const char *options); |
|---|
| 45 |
extern char *optarg; |
|---|
| 46 |
extern int optind, opterr, optopt; |
|---|
| 47 |
#endif |
|---|
| 48 |
|
|---|
| 49 |
#if HAVE_GETOPT_LONG |
|---|
| 50 |
#define SWITCH_GETOPT_LONG(a,b) a |
|---|
| 51 |
#else |
|---|
| 52 |
#define SWITCH_GETOPT_LONG(a,b) b |
|---|
| 53 |
#endif |
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
#include <time.h> |
|---|
| 59 |
|
|---|
| 60 |
#if HAVE_UTIME_H |
|---|
| 61 |
#include <utime.h> |
|---|
| 62 |
#endif |
|---|
| 63 |
|
|---|
| 64 |
#if HAVE_SYS_UTIME_H |
|---|
| 65 |
#include <sys/utime.h> |
|---|
| 66 |
#endif |
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
#if defined(__MSDOS__) || defined(__WIN32__) |
|---|
| 72 |
#define DIR_SEP ';' |
|---|
| 73 |
#else |
|---|
| 74 |
#define DIR_SEP ':' |
|---|
| 75 |
#endif |
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
#if defined(__WIN32__) |
|---|
| 81 |
#define HAVE_FUNC_MKDIR_ONEARG |
|---|
| 82 |
#endif |
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
#if !defined(__WIN32__) |
|---|
| 88 |
#define HAVE_SIGHUP |
|---|
| 89 |
#define HAVE_SIGQUIT |
|---|
| 90 |
#endif |
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
#if !HAVE_SNPRINTF |
|---|
| 96 |
#include <sys/types.h> |
|---|
| 97 |
int snprintf(char *str, size_t count, const char *fmt, ...); |
|---|
| 98 |
#else |
|---|
| 99 |
#include <stdio.h> |
|---|
| 100 |
#endif |
|---|
| 101 |
|
|---|
| 102 |
#if !HAVE_VSNPRINTF |
|---|
| 103 |
#if HAVE_STDARG_H |
|---|
| 104 |
#include <stdarg.h> |
|---|
| 105 |
#else |
|---|
| 106 |
#if HAVE_VARARGS_H |
|---|
| 107 |
#include <varargs.h> |
|---|
| 108 |
#endif |
|---|
| 109 |
#endif |
|---|
| 110 |
#include <sys/types.h> |
|---|
| 111 |
int vsnprintf(char *str, size_t count, const char *fmt, va_list arg); |
|---|
| 112 |
#else |
|---|
| 113 |
#include <stdio.h> |
|---|
| 114 |
#endif |
|---|
| 115 |
|
|---|
| 116 |
#ifdef __cplusplus |
|---|
| 117 |
} |
|---|
| 118 |
#endif |
|---|
| 119 |
|
|---|
| 120 |
#endif |
|---|
| 121 |
|
|---|