Mercurial > hg > xemacs-beta
annotate src/s/cygwin32.h @ 5253:b6a398dbb403
Fewer algorithmic complexity surprises, nicer errors, mapcarX(), maplist()
src/ChangeLog addition:
2010-09-01 Aidan Kehoe <kehoea@parhasard.net>
* fns.c (list_merge, list_array_merge_into_list)
(list_array_merge_into_array):
Avoid algorithmic complexity surprises when checking for
circularity in these functions.
(Freduce): Fix some formatting, in passing.
(mapcarX): Drop the SOME_OR_EVERY argument to this function;
instead, take CALLER, a symbol reflecting the Lisp-visible
function that called mapcarX(). Use CALLER with
mapping_interaction_error() when sequences are modified
illegally. Don't cons with #'some, #'every, not even a little.
(Fmapconcat, FmapcarX, Fmapvector, Fmapcan, Fmapc, Fmap)
(Fmap_into, Fsome, Fevery): Call mapcarX() with its new
arguments.
(Fmapcan): Don't unnecessarily complicate the nconc call.
(maplist): Take CALLER, a symbol reflecting the Lisp-visible
function that called maplist(), rather than having separate
arguments to indicate mapl vs. mapcon.
Avoid algorithmic complexity surprises when checking for
circularity. In #'mapcon, check a given stretch of
result for well-formedness once, which was not previously the
case, despite what the comments said.
(Fmaplist, Fmapl, Fmapcon):
Call maplist() with its new arguments.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Wed, 01 Sep 2010 12:51:32 +0100 |
parents | e1d8b6b0c589 |
children | 3889ef128488 308d34e9f07d |
rev | line source |
---|---|
428 | 1 /* system description file for cygwin32. |
2 Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. | |
558 | 3 Copyright (C) 2001 Ben Wing. |
428 | 4 |
613 | 5 This file is part of XEmacs. |
428 | 6 |
613 | 7 XEmacs is free software; you can redistribute it and/or modify |
428 | 8 it under the terms of the GNU General Public License as published by |
9 the Free Software Foundation; either version 2, or (at your option) | |
10 any later version. | |
11 | |
613 | 12 XEmacs is distributed in the hope that it will be useful, |
428 | 13 but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 GNU General Public License for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with XEmacs; see the file COPYING. If not, write to | |
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
20 Boston, MA 02111-1307, USA. */ | |
21 | |
22 /* Building under cygwin | |
23 * | |
442 | 24 * The approach I have taken with this port is to use primarily the |
25 * UNIX code base adding stuff that is MS-Windows specific. This works | |
26 * quite well, and is in keeping with my perception of the cygwin | |
27 * philosophy. Note that if you make changes to this file you do NOT | |
28 * want to define WIN32_NATIVE (formerly "WINDOWSNT"), I repeat - do | |
29 * not define this, it will break everything horribly. What does get | |
30 * defined is HAVE_MS_WINDOWS, but this is done by configure and only | |
31 * applies to the window system. | |
428 | 32 * |
33 * When building make sure your HOME path is unix style - i.e. without | |
34 * a drive letter. | |
35 * | |
36 * once you have done this, configure and make. | |
37 * | |
38 * windows '95 - I haven't tested this under '95, it will probably | |
39 * build but I konw there are some limitations with cygwin under 95 so | |
40 * YMMV. I build with NT4 SP3. | |
41 * | |
42 * Andy Piper <andy@xemacs.org> 8/1/98 | |
43 * http://www.xemacs.freeserve.co.uk/ */ | |
44 | |
771 | 45 #include "win32-common.h" |
46 | |
442 | 47 /* Identify ourselves */ |
48 #define CYGWIN | |
49 | |
4858
e1d8b6b0c589
Define CYGWIN_HEADERS in s/cygwin32.h and s/mingw32.h instead of syswindows.h, so they're available everywhere
Ben Wing <ben@xemacs.org>
parents:
4848
diff
changeset
|
50 /* We are using Cygwin-style headers in /usr/include, also used by MinGW */ |
e1d8b6b0c589
Define CYGWIN_HEADERS in s/cygwin32.h and s/mingw32.h instead of syswindows.h, so they're available everywhere
Ben Wing <ben@xemacs.org>
parents:
4848
diff
changeset
|
51 #define CYGWIN_HEADERS |
e1d8b6b0c589
Define CYGWIN_HEADERS in s/cygwin32.h and s/mingw32.h instead of syswindows.h, so they're available everywhere
Ben Wing <ben@xemacs.org>
parents:
4848
diff
changeset
|
52 |
428 | 53 /* cheesy way to determine cygwin version */ |
54 #ifndef NOT_C_CODE | |
442 | 55 # include <signal.h> |
558 | 56 # include <cygwin/version.h> |
442 | 57 |
58 /* Still left out of 1.1! */ | |
464 | 59 double logb (double); |
60 int killpg (int pgrp, int sig); | |
442 | 61 |
428 | 62 #endif |
63 | |
64 #ifndef ORDINARY_LINK | |
65 #define ORDINARY_LINK | |
66 #endif | |
67 | |
1111 | 68 #if __GNUC__ >= 3 |
69 #define C_SWITCH_SYSTEM -fno-caller-saves | |
70 #else | |
771 | 71 #define C_SWITCH_SYSTEM -fno-caller-saves -fvtable-thunks |
1111 | 72 #endif |
73 | |
428 | 74 #define LIBS_SYSTEM -lwinmm |
442 | 75 #define WIN32_LEAN_AND_MEAN |
428 | 76 |
77 #define TEXT_START -1 | |
78 #define HEAP_IN_DATA | |
442 | 79 #define NO_LIM_DATA |
428 | 80 |
81 #define BROKEN_SIGIO | |
558 | 82 |
613 | 83 #define CYGWIN_BROKEN_SIGNALS |
84 | |
428 | 85 #define strnicmp strncasecmp |
86 | |
87 #undef MAIL_USE_SYSTEM_LOCK | |
88 | |
89 /* SYSTEM_TYPE should indicate the kind of system you are using. | |
90 It sets the Lisp variable system-type. */ | |
91 | |
92 #define SYSTEM_TYPE "cygwin32" | |
872 | 93 |
94 /* Cygwin bogusly forgets to copy mmap()ed regions into the child when | |
95 a fork is done; thus, any reference to anything in mmap()ed space | |
96 (under PDUMP, in particular, this bites, since all data loaded from | |
97 PDUMP is normally done using mmap()) will cause an immediate segfault. */ | |
98 #undef HAVE_MMAP |