/ Check-in [5955a77d]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:"extern" declarations inside function bodies are not every compiler's favorite, so move to global scope. Additionally, at least under Unix environment use <unistd.h> to get the proper prototype instead of using a K&R-style own declaration. (CVS 4190)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5955a77d6c902dc65897ba19d6e06db3e10bd3ee
User & Date: rse 2007-07-30 18:31:53
Context
2007-07-30
18:55
Fix ticket #2439: the FTS1 and FTS2 extensions use the non-standard, unportable and highly deprecated <malloc.h> header on all platforms except Apple Mac OS X. The <malloc.h> actually is never required on any OS with an at least partly POSIX-conforming API as the malloc(3) & friends functions officially live in <stdlib.h> since over 10 years. Under some platform like FreeBSD the inclusion of <malloc.h> since a few years even causes an "#error" and this way a build failure. So, just get rid of the bad <malloc.h> usage in FTS1 and FTS2 extensions at all and stick with <stdlib.h> there only. (CVS 4191) check-in: 3f9a6661 user: rse tags: trunk
18:31
"extern" declarations inside function bodies are not every compiler's favorite, so move to global scope. Additionally, at least under Unix environment use <unistd.h> to get the proper prototype instead of using a K&R-style own declaration. (CVS 4190) check-in: 5955a77d user: rse tags: trunk
18:26
Get rid of the following compile-time warnings: tool/mkkeywordhash.c:353: warning: array subscript has type 'char' tool/mkkeywordhash.c:354: warning: array subscript has type 'char' (CVS 4189) check-in: c01d7944 user: rse tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tool/lemon.c.

14
15
16
17
18
19
20






21
22
23
24
25
26
27
....
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
#include <assert.h>

#ifndef __WIN32__
#   if defined(_WIN32) || defined(WIN32)
#	define __WIN32__
#   endif
#endif







/* #define PRIVATE static */
#define PRIVATE

#ifdef TEST
#define MAXRHS 5       /* Set low to exercise exception code */
#else
................................................................................
char *argv0;
char *name;
int modemask;
{
  char *pathlist;
  char *path,*cp;
  char c;
  extern int access();

#ifdef __WIN32__
  cp = strrchr(argv0,'\\');
#else
  cp = strrchr(argv0,'/');
#endif
  if( cp ){







>
>
>
>
>
>







 







<







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
....
2906
2907
2908
2909
2910
2911
2912

2913
2914
2915
2916
2917
2918
2919
#include <assert.h>

#ifndef __WIN32__
#   if defined(_WIN32) || defined(WIN32)
#	define __WIN32__
#   endif
#endif

#ifdef __WIN32__
extern int access();
#else
#include <unistd.h>
#endif

/* #define PRIVATE static */
#define PRIVATE

#ifdef TEST
#define MAXRHS 5       /* Set low to exercise exception code */
#else
................................................................................
char *argv0;
char *name;
int modemask;
{
  char *pathlist;
  char *path,*cp;
  char c;


#ifdef __WIN32__
  cp = strrchr(argv0,'\\');
#else
  cp = strrchr(argv0,'/');
#endif
  if( cp ){