From: Steve Hay Date: Mon, 25 Feb 2008 17:42:38 +0000 (+0000) Subject: Silence Borland compiler warnings (except for warnings from zlib) here: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0934c9d92d03b9af0e4cebeaa0942ad89e7cc04b;p=p5sagit%2Fp5-mst-13.2.git Silence Borland compiler warnings (except for warnings from zlib) here: http://www.nntp.perl.org/group/perl.daily-build.reports/2008/02/msg53937.html p4raw-id: //depot/perl@33370 --- diff --git a/NetWare/nwperlhost.h b/NetWare/nwperlhost.h index e257dd9..9839184 100644 --- a/NetWare/nwperlhost.h +++ b/NetWare/nwperlhost.h @@ -441,7 +441,7 @@ PerlStdIOGetc(struct IPerlStdIO* piPerl, PerlIO* pf) return nw_getc((FILE*)pf); } -char* +STDCHAR* PerlStdIOGetBase(struct IPerlStdIO* piPerl, PerlIO* pf) { #ifdef FILE_base @@ -474,7 +474,7 @@ PerlStdIOGetCnt(struct IPerlStdIO* piPerl, PerlIO* pf) #endif } -char* +STDCHAR* PerlStdIOGetPtr(struct IPerlStdIO* piPerl, PerlIO* pf) { #ifdef USE_STDIO_PTR @@ -568,7 +568,7 @@ PerlStdIOSetCnt(struct IPerlStdIO* piPerl, PerlIO* pf, int n) } void -PerlStdIOSetPtrCnt(struct IPerlStdIO* piPerl, PerlIO* pf, char * ptr, int n) +PerlStdIOSetPtrCnt(struct IPerlStdIO* piPerl, PerlIO* pf, STDCHAR * ptr, int n) { #ifdef STDIO_PTR_LVALUE FILE *f = (FILE*)pf; diff --git a/NetWare/nwperlsys.h b/NetWare/nwperlsys.h index 932b066..ff41d69 100644 --- a/NetWare/nwperlsys.h +++ b/NetWare/nwperlsys.h @@ -335,7 +335,7 @@ PerlStdIOGetc(struct IPerlStdIO* piPerl, FILE* pf) return nw_getc(pf); } -char* +STDCHAR* PerlStdIOGetBase(struct IPerlStdIO* piPerl, FILE* pf) { #ifdef FILE_base @@ -368,7 +368,7 @@ PerlStdIOGetCnt(struct IPerlStdIO* piPerl, FILE* pf) #endif } -char* +STDCHAR* PerlStdIOGetPtr(struct IPerlStdIO* piPerl, FILE* pf) { #ifdef USE_STDIO_PTR @@ -461,7 +461,7 @@ PerlStdIOSetCnt(struct IPerlStdIO* piPerl, FILE* pf, int n) } void -PerlStdIOSetPtr(struct IPerlStdIO* piPerl, FILE* pf, char * ptr) +PerlStdIOSetPtr(struct IPerlStdIO* piPerl, FILE* pf, STDCHAR * ptr) { #ifdef STDIO_PTR_LVALUE FILE *f = pf; diff --git a/ext/Time/Piece/Piece.pm b/ext/Time/Piece/Piece.pm index 5871fac..61e0bf1 100644 --- a/ext/Time/Piece/Piece.pm +++ b/ext/Time/Piece/Piece.pm @@ -22,7 +22,7 @@ our %EXPORT_TAGS = ( ':override' => 'internal', ); -our $VERSION = '1.12'; +our $VERSION = '1.12_01'; bootstrap Time::Piece $VERSION; diff --git a/ext/Time/Piece/Piece.xs b/ext/Time/Piece/Piece.xs index dc3a73e..8ceabf4 100644 --- a/ext/Time/Piece/Piece.xs +++ b/ext/Time/Piece/Piece.xs @@ -245,8 +245,12 @@ my_mini_mktime(struct tm *ptm) #define strncasecmp(x,y,n) strnicmp(x,y,n) #if defined(WIN32) +#if defined(__BORLANDC__) +void * __cdecl _EXPFUNC alloca(_SIZE_T __size); +#else #define alloca _alloca #endif +#endif #include #include diff --git a/ext/Win32/Win32.pm b/ext/Win32/Win32.pm index 1f909e4..d09a231 100644 --- a/ext/Win32/Win32.pm +++ b/ext/Win32/Win32.pm @@ -8,7 +8,7 @@ BEGIN { require DynaLoader; @ISA = qw|Exporter DynaLoader|; - $VERSION = '0.34'; + $VERSION = '0.34_01'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/ext/Win32/Win32.xs b/ext/Win32/Win32.xs index d6c8063..f2b02c0 100644 --- a/ext/Win32/Win32.xs +++ b/ext/Win32/Win32.xs @@ -37,7 +37,7 @@ typedef BOOL (__stdcall *PFNAllocateAndInitializeSid)(PSID_IDENTIFIER_AUTHORITY, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, PSID*); typedef BOOL (__stdcall *PFNEqualSid)(PSID, PSID); typedef void* (__stdcall *PFNFreeSid)(PSID); -typedef BOOL (__stdcall *PFNIsUserAnAdmin)(); +typedef BOOL (__stdcall *PFNIsUserAnAdmin)(void); #ifndef CSIDL_MYMUSIC # define CSIDL_MYMUSIC 0x000D diff --git a/generate_uudmap.c b/generate_uudmap.c index 664333e..28cfd27 100644 --- a/generate_uudmap.c +++ b/generate_uudmap.c @@ -14,7 +14,7 @@ int main() { char *p; for (i = 0; i < sizeof(PL_uuemap) - 1; ++i) - PL_uudmap[(U8)PL_uuemap[i]] = i; + PL_uudmap[(U8)PL_uuemap[i]] = (char)i; /* * Because ' ' and '`' map to the same value, * we need to decode them both the same. diff --git a/iperlsys.h b/iperlsys.h index f1f5c46..d7b7643 100644 --- a/iperlsys.h +++ b/iperlsys.h @@ -73,10 +73,10 @@ typedef int (*LPEof)(struct IPerlStdIO*, FILE*); typedef int (*LPError)(struct IPerlStdIO*, FILE*); typedef void (*LPClearerr)(struct IPerlStdIO*, FILE*); typedef int (*LPGetc)(struct IPerlStdIO*, FILE*); -typedef char* (*LPGetBase)(struct IPerlStdIO*, FILE*); +typedef STDCHAR* (*LPGetBase)(struct IPerlStdIO*, FILE*); typedef int (*LPGetBufsiz)(struct IPerlStdIO*, FILE*); typedef int (*LPGetCnt)(struct IPerlStdIO*, FILE*); -typedef char* (*LPGetPtr)(struct IPerlStdIO*, FILE*); +typedef STDCHAR* (*LPGetPtr)(struct IPerlStdIO*, FILE*); typedef char* (*LPGets)(struct IPerlStdIO*, FILE*, char*, int); typedef int (*LPPutc)(struct IPerlStdIO*, FILE*, int); typedef int (*LPPuts)(struct IPerlStdIO*, FILE*, const char*); @@ -94,9 +94,9 @@ typedef int (*LPSetVBuf)(struct IPerlStdIO*, FILE*, char*, int, typedef void (*LPSetCnt)(struct IPerlStdIO*, FILE*, int); #ifndef NETWARE -typedef void (*LPSetPtr)(struct IPerlStdIO*, FILE*, char*); +typedef void (*LPSetPtr)(struct IPerlStdIO*, FILE*, STDCHAR*); #elif defined(NETWARE) -typedef void (*LPSetPtr)(struct IPerlStdIO*, FILE*, char*, int); +typedef void (*LPSetPtr)(struct IPerlStdIO*, FILE*, STDCHAR*, int); #endif typedef void (*LPSetlinebuf)(struct IPerlStdIO*, FILE*); diff --git a/perl.h b/perl.h index c241ae6..68750fe 100644 --- a/perl.h +++ b/perl.h @@ -4010,7 +4010,7 @@ typedef Sighandler_t Sigsave_t; #endif #ifdef USE_PERLIO -EXTERN_C void PerlIO_teardown(); +EXTERN_C void PerlIO_teardown(void); # ifdef USE_ITHREADS # define PERLIO_INIT MUTEX_INIT(&PL_perlio_mutex) # define PERLIO_TERM \ diff --git a/perlio.c b/perlio.c index 597bf78..d0f51d5 100644 --- a/perlio.c +++ b/perlio.c @@ -2424,7 +2424,7 @@ PerlIO_cleanup(pTHX) } } -void PerlIO_teardown() /* Call only from PERL_SYS_TERM(). */ +void PerlIO_teardown(void) /* Call only from PERL_SYS_TERM(). */ { dVAR; #if 0 diff --git a/perliol.h b/perliol.h index 9a08d81..6b714bb 100644 --- a/perliol.h +++ b/perliol.h @@ -170,7 +170,7 @@ PERL_EXPORT_C void PerlIO_list_free(pTHX_ PerlIO_list_t *list); /* PerlIO_teardown doesn't need exporting, but the EXTERN_C is needed * for compiling as C++. Must also match with what perl.h says. */ -EXTERN_C void PerlIO_teardown(); +EXTERN_C void PerlIO_teardown(void); /*--------------------------------------------------------------------------------------*/ /* Generic, or stub layer functions */ diff --git a/perly.c b/perly.c index 5a3d409..12dd18b 100644 --- a/perly.c +++ b/perly.c @@ -193,7 +193,7 @@ static void S_clear_yystack(pTHX_ const yy_parser *parser) { yy_stack_frame *ps = parser->ps; - int i; + int i = 0; if (!parser->stack || ps == parser->stack) return; diff --git a/regcomp.c b/regcomp.c index 5c05635..05b54ee 100644 --- a/regcomp.c +++ b/regcomp.c @@ -4417,7 +4417,10 @@ reStudy: Zero(r->substrs, 1, struct reg_substr_data); #ifdef TRIE_STUDY_OPT - if ( restudied ) { + if (!restudied) { + StructCopy(&zero_scan_data, &data, scan_data_t); + copyRExC_state = RExC_state; + } else { U32 seen=RExC_seen; DEBUG_OPTIMISE_r(PerlIO_printf(Perl_debug_log,"Restudying\n")); @@ -4432,9 +4435,6 @@ reStudy: SvREFCNT_dec(data.last_found); } StructCopy(&zero_scan_data, &data, scan_data_t); - } else { - StructCopy(&zero_scan_data, &data, scan_data_t); - copyRExC_state = RExC_state; } #else StructCopy(&zero_scan_data, &data, scan_data_t); diff --git a/win32/perlhost.h b/win32/perlhost.h index 76e4696..3bd3e16 100644 --- a/win32/perlhost.h +++ b/win32/perlhost.h @@ -616,7 +616,7 @@ PerlStdIOGetc(struct IPerlStdIO* piPerl, FILE* pf) return win32_getc(pf); } -char* +STDCHAR* PerlStdIOGetBase(struct IPerlStdIO* piPerl, FILE* pf) { #ifdef FILE_base @@ -649,7 +649,7 @@ PerlStdIOGetCnt(struct IPerlStdIO* piPerl, FILE* pf) #endif } -char* +STDCHAR* PerlStdIOGetPtr(struct IPerlStdIO* piPerl, FILE* pf) { #ifdef USE_STDIO_PTR @@ -742,7 +742,7 @@ PerlStdIOSetCnt(struct IPerlStdIO* piPerl, FILE* pf, int n) } void -PerlStdIOSetPtr(struct IPerlStdIO* piPerl, FILE* pf, char * ptr) +PerlStdIOSetPtr(struct IPerlStdIO* piPerl, FILE* pf, STDCHAR * ptr) { #ifdef STDIO_PTR_LVALUE FILE *f = pf; diff --git a/win32/win32.c b/win32/win32.c index f8e98b9..5b701e9 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1639,7 +1639,7 @@ win32_longpath(char *path) } static void -out_of_memory() +out_of_memory(void) { if (PL_curinterp) { dTHX; @@ -2553,7 +2553,7 @@ win32_stdin(void) } DllExport FILE * -win32_stdout() +win32_stdout(void) { return (stdout); } @@ -2935,7 +2935,7 @@ win32_fstat(int fd, Stat_t *sbufptr) if (GetFileInformationByHandle((HANDLE)_get_osfhandle(fd), &bhfi)) { #if defined(WIN64) || defined(USE_LARGE_FILES) - sbufptr->st_size = (bhfi.nFileSizeHigh << 32) + bhfi.nFileSizeLow ; + sbufptr->st_size = ((__int64)bhfi.nFileSizeHigh << 32) | bhfi.nFileSizeLow ; #endif sbufptr->st_mode &= 0xFE00; if (bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY) @@ -4942,7 +4942,7 @@ win32_process_message(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) } void -win32_create_message_window_class() +win32_create_message_window_class(void) { /* create the window class for "message only" windows */ WNDCLASS wc; @@ -4958,7 +4958,7 @@ win32_create_message_window_class() } HWND -win32_create_message_window() +win32_create_message_window(void) { HWND hwnd = NULL;