Skip to content

Commit

Permalink
silence CC warnings on >= VC 2005
Browse files Browse the repository at this point in the history
unix/dcache:
- make extern.h be first for Win32 warnings disable

unix/runargv.c:
- extern.h includes signal.h, specifying signal.h before extern.h causes
  the Win32 specific defines which disable warnings to be skipped, the
  reason for signal.h before extern.h is before git history and is
  therefore unknown

win95/switchar.c:
- all 3 includes are in extern.h
  • Loading branch information
bulk88 committed Mar 10, 2015
1 parent e5588b0 commit aac838b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
13 changes: 13 additions & 0 deletions extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@
/* For MSVC++ needs to include windows.h first to avoid problems with
* type redefinitions. Include it also for MinGW for consistency. */
#if defined(__MINGW32__) || defined(_MSC_VER)
/* silence warnings about using null term strings in >= VC 2005
sysintf.c(918) : warning C4996: 'strcat' was declared deprecated
Message: 'This function or variable may be unsafe. Consider using strcat
_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online hel
p for details.' */
#define _CRT_SECURE_NO_DEPRECATE
/* silence warnings about using POSIX name funcs in >= VC 2005
sysintf.c(1132) : warning C4996: 'unlink' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\stdio.h(290) : see
declaration of 'unlink'
Message: 'The POSIX name for this item is deprecated. Instead, use the I
SO C++ conformant name: _unlink. See online help for details.' */
#define _CRT_NONSTDC_NO_DEPRECATE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion unix/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
#undef __WIN32__
#endif

#include "extern.h"
#ifdef __APPLE__
#include <sys/types.h>
#endif
#include <dirent.h>
#include "extern.h"
#include <sysintf.h>


Expand Down
2 changes: 0 additions & 2 deletions unix/runargv.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ _finished_child(pid, status) [unix/runargv] handles the finished child. If
with runargv().
*/

#include <signal.h>

#include "extern.h"

#ifdef HAVE_WAIT_H
Expand Down
4 changes: 1 addition & 3 deletions win95/switchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
-- Use cvs log to obtain detailed change logs.
*/

#include <stdlib.h>
#include <stdio.h>
#include "stdmacs.h"
#include "extern.h"

getswitchar()/*
===============
Expand Down

0 comments on commit aac838b

Please sign in to comment.