Changeset 363


Ignore:
Timestamp:
11/23/07 17:39:02 (16 years ago)
Author:
r2d
Message:
  • corrections to compile with msvc c (c89?)
  • removed headers from other lib
Location:
libmpc/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/mpc2sv8/mpc2sv8.c

    r359 r363  
    233233        int c, i;
    234234        mpc_bool_t overwrite = MPC_FALSE, use_dir = MPC_FALSE;
     235        int ret = MPC_STATUS_OK;
    235236        printf(About);
    236         int ret = MPC_STATUS_OK;
    237237
    238238        while ((c = getopt(argc , argv, "oh")) != -1) {
  • libmpc/trunk/win32/basename.c

    r362 r363  
    4848     * in which to create a wide character reference copy of path
    4949     */
    50 
    51     wchar_t refcopy[1 + (len = mbstowcs( NULL, path, 0 ))];
     50         
     51    wchar_t * refcopy, * refpath;
     52    len = mbstowcs( NULL, path, 0 );
     53    refcopy = malloc((1 + len) * sizeof(wchar_t));
    5254
    5355    /* create the wide character reference copy of path,
     
    5557     */
    5658
    57     wchar_t *refpath = refcopy;
     59    refpath = refcopy;
    5860    if( ((len = mbstowcs( refpath, path, len )) > 1) && (refpath[1] == L':') )
    5961    {
     
    142144    }
    143145
     146    free(refcopy);
    144147    /* or we had an empty residual path name, after the drive designator,
    145148     * in which case we simply fall through ...
  • libmpc/trunk/win32/dirent.c

    r362 r363  
    5151
    5252#include <dirent.h>
    53 
    54 #include <unixem/unixem.h>
    5553
    5654#include <errno.h>
  • libmpc/trunk/win32/libgen.h

    r362 r363  
    1414#define _LIBGEN_H_
    1515
    16 /* All the headers include this file. */
    17 #include <_mingw.h>
    18 
    1916#ifdef __cplusplus
    2017extern "C" {
    2118#endif
    2219
    23 extern __cdecl __MINGW_NOTHROW char *basename (char *);
    24 extern __cdecl __MINGW_NOTHROW char *dirname  (char *);
     20extern char *basename (char *);
    2521
    2622#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.