summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-12-28 04:47:50 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-12-28 04:47:50 (GMT)
commitf6657e67b3cf89649d14d9012b3964a3490d45b0 (patch)
treef04317257f7b1ff54f5142eda58af84c6d261bc1 /Include
parent545686b279ef382ec35aa12afa1f9271ce6d5109 (diff)
downloadcpython-f6657e67b3cf89649d14d9012b3964a3490d45b0.zip
cpython-f6657e67b3cf89649d14d9012b3964a3490d45b0.tar.gz
cpython-f6657e67b3cf89649d14d9012b3964a3490d45b0.tar.bz2
Cruft removal:
* DL_IMPORT/DL_EXPORT * #if 0'd code * Py_PROTO which was obsolete, but still used in one place in addrinfo.h
Diffstat (limited to 'Include')
-rw-r--r--Include/Python.h8
-rw-r--r--Include/pyport.h84
2 files changed, 1 insertions, 91 deletions
diff --git a/Include/Python.h b/Include/Python.h
index d75854c..397ceb9 100644
--- a/Include/Python.h
+++ b/Include/Python.h
@@ -48,14 +48,6 @@
#include "pyport.h"
-/* pyconfig.h or pyport.h may or may not define DL_IMPORT */
-#ifndef DL_IMPORT /* declarations for DLL import/export */
-#define DL_IMPORT(RTYPE) RTYPE
-#endif
-#ifndef DL_EXPORT /* declarations for DLL import/export */
-#define DL_EXPORT(RTYPE) RTYPE
-#endif
-
/* Debug-mode build with pymalloc implies PYMALLOC_DEBUG.
* PYMALLOC_DEBUG is in error if pymalloc is not in use.
*/
diff --git a/Include/pyport.h b/Include/pyport.h
index 36d517c..fb57ace 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -35,17 +35,6 @@ Used in: PY_LONG_LONG
**************************************************************************/
-
-/* For backward compatibility only. Obsolete, do not use. */
-#ifdef HAVE_PROTOTYPES
-#define Py_PROTO(x) x
-#else
-#define Py_PROTO(x) ()
-#endif
-#ifndef Py_FPROTO
-#define Py_FPROTO(x) Py_PROTO(x)
-#endif
-
/* typedefs for some C9X-defined synonyms for integral types.
*
* The names in Python are exactly the same as the C9X names, except with a
@@ -226,9 +215,7 @@ typedef Py_intptr_t Py_ssize_t;
/* NB caller must include <sys/types.h> */
#ifdef HAVE_SYS_SELECT_H
-
#include <sys/select.h>
-
#endif /* !HAVE_SYS_SELECT_H */
/*******************************
@@ -504,7 +491,7 @@ extern int gethostname(char *, int);
#ifdef __BEOS__
/* Unchecked */
/* It's in the libs, but not the headers... - [cjh] */
-int shutdown( int, int );
+int shutdown(int, int);
#endif
#ifdef HAVE__GETPTY
@@ -523,25 +510,6 @@ extern int forkpty(int *, char *, struct termios *, struct winsize *);
#endif /* defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) */
-/* These are pulled from various places. It isn't obvious on what platforms
- they are necessary, nor what the exact prototype should look like (which
- is likely to vary between platforms!) If you find you need one of these
- declarations, please move them to a platform-specific block and include
- proper prototypes. */
-#if 0
-
-/* From Modules/resource.c */
-extern int getrusage();
-extern int getpagesize();
-
-/* From Python/sysmodule.c and Modules/posixmodule.c */
-extern int fclose(FILE *);
-
-/* From Modules/posixmodule.c */
-extern int fdatasync(int);
-#endif /* 0 */
-
-
/************************
* WRAPPER FOR <math.h> *
************************/
@@ -651,56 +619,6 @@ extern double hypot(double, double);
# endif /* __cplusplus */
#endif
-/* Deprecated DL_IMPORT and DL_EXPORT macros */
-#if defined(Py_ENABLE_SHARED) && defined (HAVE_DECLSPEC_DLL)
-# if defined(Py_BUILD_CORE)
-# define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
-# define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
-# else
-# define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
-# define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
-# endif
-#endif
-#ifndef DL_EXPORT
-# define DL_EXPORT(RTYPE) RTYPE
-#endif
-#ifndef DL_IMPORT
-# define DL_IMPORT(RTYPE) RTYPE
-#endif
-/* End of deprecated DL_* macros */
-
-/* If the fd manipulation macros aren't defined,
- here is a set that should do the job */
-
-#if 0 /* disabled and probably obsolete */
-
-#ifndef FD_SETSIZE
-#define FD_SETSIZE 256
-#endif
-
-#ifndef FD_SET
-
-typedef long fd_mask;
-
-#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
-#ifndef howmany
-#define howmany(x, y) (((x)+((y)-1))/(y))
-#endif /* howmany */
-
-typedef struct fd_set {
- fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
-} fd_set;
-
-#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
-#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
-#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
-#define FD_ZERO(p) memset((char *)(p), '\0', sizeof(*(p)))
-
-#endif /* FD_SET */
-
-#endif /* fd manipulation macros */
-
-
/* limits.h constants that may be missing */
#ifndef INT_MAX