summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorpixel <pixel>2002-12-23 15:28:15 +0000
committerpixel <pixel>2002-12-23 15:28:15 +0000
commit3dbdb39eb0abdd9a1aeb3744e5fe8a43e0afadc1 (patch)
treedd1c5b632ba05b3388d3e0ab1731e14021386af9 /include
parentc1271b904b730dbf427366d9aa6388037931ba84 (diff)
pre-commit patch
Diffstat (limited to 'include')
-rw-r--r--include/Action.h4
-rw-r--r--include/Buffer.h4
-rw-r--r--include/Confirm.h4
-rw-r--r--include/CopyJob.h4
-rw-r--r--include/Exceptions.h5
-rw-r--r--include/Form.h4
-rw-r--r--include/Handle.h4
-rw-r--r--include/HttpServ.h4
-rw-r--r--include/IRC.h4
-rw-r--r--include/Image.h4
-rw-r--r--include/InPipe.h4
-rw-r--r--include/Input.h4
-rw-r--r--include/Menu.h4
-rw-r--r--include/Message.h4
-rw-r--r--include/OutPipe.h4
-rw-r--r--include/Output.h4
-rw-r--r--include/ReadJob.h4
-rw-r--r--include/Regex.h4
-rw-r--r--include/Socket.h4
-rw-r--r--include/String.h4
-rw-r--r--include/Table.h4
-rw-r--r--include/Task.h4
-rw-r--r--include/TaskMan.h4
-rw-r--r--include/Variables.h4
-rw-r--r--include/generic.h20
-rw-r--r--include/template.h5
26 files changed, 9 insertions, 113 deletions
diff --git a/include/Action.h b/include/Action.h
index d11162f..2a4c75a 100644
--- a/include/Action.h
+++ b/include/Action.h
@@ -1,6 +1,5 @@
#ifndef __ACTION_H__
#define __ACTION_H__
-#ifdef __cplusplus
#include <Task.h>
#include <Handle.h>
@@ -30,7 +29,4 @@ class Action : public Base {
bool hastoclean, accessed;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Buffer.h b/include/Buffer.h
index dc4d768..316af13 100644
--- a/include/Buffer.h
+++ b/include/Buffer.h
@@ -1,6 +1,5 @@
#ifndef __BUFFER_H__
#define __BUFFER_H__
-#ifdef __cplusplus
#include <zlib.h>
#include <Exceptions.h>
@@ -31,7 +30,4 @@ class Buffer : public Handle {
size_t realsiz, bufsiz, ptr;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Confirm.h b/include/Confirm.h
index da0365d..3e215d3 100644
--- a/include/Confirm.h
+++ b/include/Confirm.h
@@ -1,6 +1,5 @@
#ifndef __CONFIRM_H__
#define __CONFIRM_H__
-#ifdef __cplusplus
#include <Action.h>
#include <String.h>
@@ -18,7 +17,4 @@ class Confirm : public Action {
Action * NYes, * NNo;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/CopyJob.h b/include/CopyJob.h
index 4351570..8e4135c 100644
--- a/include/CopyJob.h
+++ b/include/CopyJob.h
@@ -1,6 +1,5 @@
#ifndef __COPYJOB_H__
#define __COPYJOB_H__
-#ifdef __cplusplus
#include <Task.h>
#include <Handle.h>
@@ -22,7 +21,4 @@ class CopyJob : public Task {
int r, w, tw;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Exceptions.h b/include/Exceptions.h
index a3fad9e..b1ca63f 100644
--- a/include/Exceptions.h
+++ b/include/Exceptions.h
@@ -1,12 +1,12 @@
#ifndef __EXCEPTIONS_H__
#define __EXCEPTIONS_H__
-#ifdef __cplusplus
#include <stdio.h>
#include <unistd.h>
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
+#include <generic.h>
class String;
@@ -100,7 +100,4 @@ class Exit : public GeneralException {
#include <String.h>
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Form.h b/include/Form.h
index 9e77967..b12e2b5 100644
--- a/include/Form.h
+++ b/include/Form.h
@@ -1,6 +1,5 @@
#ifndef __FORM_H__
#define __FORM_H__
-#ifdef __cplusplus
#include <Action.h>
#include <String.h>
@@ -21,7 +20,4 @@ class Form : public Action {
Action * Next;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Handle.h b/include/Handle.h
index e545109..581d9d0 100644
--- a/include/Handle.h
+++ b/include/Handle.h
@@ -1,6 +1,5 @@
#ifndef __HANDLE_H__
#define __HANDLE_H__
-#ifdef __cplusplus
#include <sys/types.h>
#include <time.h>
@@ -51,7 +50,4 @@ Handle & operator>>(Handle &, String &);
void copy(Handle *, Handle *, ssize_t = -1);
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/HttpServ.h b/include/HttpServ.h
index 7d63517..a0dd958 100644
--- a/include/HttpServ.h
+++ b/include/HttpServ.h
@@ -1,6 +1,5 @@
#ifndef __HTTPSERV_H__
#define __HTTPSERV_H__
-#ifdef __cplusplus
#include <Socket.h>
#include <String.h>
@@ -28,7 +27,4 @@ class HttpServ : public Task {
extern String endhl, endnl;
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/IRC.h b/include/IRC.h
index 457c199..285d9bf 100644
--- a/include/IRC.h
+++ b/include/IRC.h
@@ -1,6 +1,5 @@
#ifndef __IRC_H__
#define __IRC_H__
-#ifdef __cplusplus
#include <Socket.h>
#include <Exceptions.h>
@@ -198,7 +197,4 @@ class IRC : public Base {
int loginsequence;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Image.h b/include/Image.h
index 87a8ddd..633ab55 100644
--- a/include/Image.h
+++ b/include/Image.h
@@ -1,6 +1,5 @@
#ifndef __IMAGE_H__
#define __IMAGE_H__
-#ifdef __cplusplus
#include <Buffer.h>
#include <generic.h>
@@ -51,7 +50,4 @@ class Image : public Buffer {
Color * img;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/InPipe.h b/include/InPipe.h
index fa14868..2828da3 100644
--- a/include/InPipe.h
+++ b/include/InPipe.h
@@ -1,6 +1,5 @@
#ifndef __INPIPE_H__
#define __INPIPE_H__
-#ifdef __cplusplus
#include <Handle.h>
@@ -17,7 +16,4 @@ class InPipe : public Handle {
int p[2], hooked;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Input.h b/include/Input.h
index cb1428f..80bd73e 100644
--- a/include/Input.h
+++ b/include/Input.h
@@ -1,6 +1,5 @@
#ifndef __INPUT_H__
#define __INPUT_H__
-#ifdef __cplusplus
#include <sys/types.h>
#include <time.h>
@@ -36,7 +35,4 @@ class Stdin_t : public Input {
extern Stdin_t Stdin;
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Menu.h b/include/Menu.h
index 2558920..461f5e2 100644
--- a/include/Menu.h
+++ b/include/Menu.h
@@ -1,6 +1,5 @@
#ifndef __MENU_H__
#define __MENU_H__
-#ifdef __cplusplus
#include <Action.h>
#include <String.h>
@@ -20,7 +19,4 @@ class Menu : public Action {
int nba;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Message.h b/include/Message.h
index 35437bd..2ee28e3 100644
--- a/include/Message.h
+++ b/include/Message.h
@@ -1,6 +1,5 @@
#ifndef __MESSAGE_H__
#define __MESSAGE_H__
-#ifdef __cplusplus
#include <Action.h>
#include <String.h>
@@ -18,7 +17,4 @@ class Message : public Action {
Action * Next;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/OutPipe.h b/include/OutPipe.h
index 4a9befe..467a89b 100644
--- a/include/OutPipe.h
+++ b/include/OutPipe.h
@@ -1,6 +1,5 @@
#ifndef __OUTPIPE_H__
#define __OUTPIPE_H__
-#ifdef __cplusplus
#include <Handle.h>
@@ -17,7 +16,4 @@ class OutPipe : public Handle {
int p[2], hooked;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Output.h b/include/Output.h
index eb7b8a6..9e83845 100644
--- a/include/Output.h
+++ b/include/Output.h
@@ -1,6 +1,5 @@
#ifndef __OUTPUT_H__
#define __OUTPUT_H__
-#ifdef __cplusplus
#include <sys/types.h>
#include <time.h>
@@ -45,7 +44,4 @@ class Stderr_t : public Handle {
extern Stdout_t Stdout;
extern Stderr_t Stderr;
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/ReadJob.h b/include/ReadJob.h
index 7d4bfc7..d861aff 100644
--- a/include/ReadJob.h
+++ b/include/ReadJob.h
@@ -1,6 +1,5 @@
#ifndef __READJOB_H__
#define __READJOB_H__
-#ifdef __cplusplus
#include <Task.h>
#include <Handle.h>
@@ -18,7 +17,4 @@ class ReadJob : public Task {
const Regex * regex;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Regex.h b/include/Regex.h
index 9c8d466..ce62028 100644
--- a/include/Regex.h
+++ b/include/Regex.h
@@ -1,6 +1,5 @@
#ifndef __REGEX_H__
#define __REGEX_H__
-#ifdef __cplusplus
#include <Exceptions.h>
#include <String.h>
@@ -20,7 +19,4 @@ class Regex : public Base {
extern Regex empty, any;
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Socket.h b/include/Socket.h
index 203b399..055e512 100644
--- a/include/Socket.h
+++ b/include/Socket.h
@@ -1,6 +1,5 @@
#ifndef __SOCKET_H__
#define __SOCKET_H__
-#ifdef __cplusplus
#include <Handle.h>
#include <String.h>
@@ -31,7 +30,4 @@ class Socket : public Handle {
bool connected, listening, writeclosed, readclosed;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/String.h b/include/String.h
index f477998..948534e 100644
--- a/include/String.h
+++ b/include/String.h
@@ -1,6 +1,5 @@
#ifndef __STRING_H__
#define __STRING_H__
-#ifdef __cplusplus
#include <string.h>
#include <iostream>
@@ -67,7 +66,4 @@ std::istream & operator>>(std::istream &, String &);
String operator+(const char *, const String &);
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Table.h b/include/Table.h
index c616e7e..58336d0 100644
--- a/include/Table.h
+++ b/include/Table.h
@@ -1,6 +1,5 @@
#ifndef __TABLE_H__
#define __TABLE_H__
-#ifdef __cplusplus
#include <Action.h>
#include <String.h>
@@ -19,7 +18,4 @@ class Table : public Action {
Action * Next;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Task.h b/include/Task.h
index 17df72e..9c966a3 100644
--- a/include/Task.h
+++ b/include/Task.h
@@ -1,6 +1,5 @@
#ifndef __TASK_H__
#define __TASK_H__
-#ifdef __cplusplus
#include <unistd.h>
#include <sys/time.h>
@@ -53,7 +52,4 @@ class Task : public Base {
Task * wbta;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/TaskMan.h b/include/TaskMan.h
index a3b03ab..128339f 100644
--- a/include/TaskMan.h
+++ b/include/TaskMan.h
@@ -1,6 +1,5 @@
#ifndef __TASKMAN_H__
#define __TASKMAN_H__
-#ifdef __cplusplus
#include <signal.h>
#include <Task.h>
@@ -72,7 +71,4 @@ class TaskMan : public Base {
static sigset_t sigchildset;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/Variables.h b/include/Variables.h
index c82ad87..2bbc406 100644
--- a/include/Variables.h
+++ b/include/Variables.h
@@ -1,6 +1,5 @@
#ifndef __VARIABLES_H__
#define __VARIABLES_H__
-#ifdef __cplusplus
#include <vector>
#include <String.h>
@@ -26,7 +25,4 @@ class Variables : public Base {
int nbvars;
};
-#else
-#error This only works with a C++ compiler
-#endif
#endif
diff --git a/include/generic.h b/include/generic.h
index 4b9c455..28a3baf 100644
--- a/include/generic.h
+++ b/include/generic.h
@@ -57,7 +57,11 @@ typedef Uint16 Word;
typedef Uint32 DWord;
#endif
-#if defined __linux__ || defined __solaris__ || defined __CYGWIN32__
+#ifndef HAVE_SSIZE_T
+typedef int32 ssize_t;
+#endif
+
+#if defined __linux__ || defined __solaris__ || defined __CYGWIN32__ || defined FORCE64
typedef long long int64;
typedef unsigned long long uint64;
#elif defined _WIN32
@@ -67,16 +71,18 @@ typedef unsigned _int64 int64;
#error Unsupported platform (need 64 bits ints definition)
#endif
+#ifndef PACKED
#if defined __linux__ || defined __CYGWIN32__
#define PACKED __attribute__((packed))
#else
#define PACKED
#endif
+#endif
extern char verbosity;
char ** split(char * s, char t);
-#ifdef __cplusplus
+#if defined __cplusplus || defined __WIN32__
#ifndef MAX
template<class T>
@@ -119,14 +125,4 @@ inline T MIN(T a, T b) {
#error Unknow compiler/platform
#endif
-#if defined __linux__ || defined __solaris__ || defined __CYGWIN32__
-typedef long long int64;
-typedef unsigned long long uint64;
-#elif defined _WIN32
-typedef _int64 int64;
-typedef unsigned _int64 int64;
-#else
-#error Unsupported platform (need 64 bits ints definition)
-#endif
-
#endif
diff --git a/include/template.h b/include/template.h
index f18662f..591bfcb 100644
--- a/include/template.h
+++ b/include/template.h
@@ -1,8 +1,3 @@
#ifndef ___H__
#define ___H__
-#ifdef __cplusplus
-
-#else
-#error This only works with a C++ compiler
-#endif
#endif