* PATCH: zsh-3.1.5-pws-6: cygwin rlimit config fix
@ 1999-02-01 2:44 Matt Armstrong
0 siblings, 0 replies; only message in thread
From: Matt Armstrong @ 1999-02-01 2:44 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 941 bytes --]
Zsh's makepro.awk script currently pulls all the prototypes out of the
source file regardless of whether they're compiled into the image.
This causes a problem with with exec.pro, since it pulls out
prototypes for current_limits, which is in terms of the RLIM_NLIMITS
#define. If HAVE_GETRLIMIT isn't defined, RLIM_NLIMITS probably isn't
either. The upshot is that exec.pro doesn't compile when running
under cygwin.
It also causes a few warnings to have prototypes for static functions
that are never defined.
The fix I used was to have makepro.awk handle things like
/**/
#ifdef HAVE_GETRLIMIT
and spit them out in the .pro file along with the prototypes like so:
#ifdef HAVE_GETRLIMIT
extern struct rlimit current_limits[RLIM_NLIMITS];
extern struct rlimit limits[RLIM_NLIMITS];
extern int zsetlimit _((int limnum,char*nam));
extern int setlimits _((char*nam));
#endif /* HAVE_GETRLIMIT */
...which nicely avoids the problem.
[-- Attachment #2: Fix for rlimit config problem --]
[-- Type: application/x-patch, Size: 2076 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-02-01 2:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-01 2:44 PATCH: zsh-3.1.5-pws-6: cygwin rlimit config fix Matt Armstrong
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).