Changeset 4657


Ignore:
Timestamp:
Sep 23, 2010, 12:18:07 AM (8 years ago)
Author:
Sam Hocevar
Message:

Fix the Linux build to accomodate with the new Win32 features.

Location:
zzuf/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/Makefile.am

    r4364 r4657  
    1515    libzzuf/network.c libzzuf/network.h \
    1616    libzzuf/lib-fd.c libzzuf/lib-mem.c libzzuf/lib-signal.c \
    17     libzzuf/lib-stream.c libzzuf/lib-load.h
     17    libzzuf/lib-stream.c libzzuf/lib-win32.c libzzuf/lib-load.h
    1818
    1919COMMON = \
  • zzuf/trunk/src/libzzuf/lib-load.h

    r4656 r4657  
    1919#define ORIG(x) x##_orig
    2020
    21 #ifdef HAVE_DLFCN_H
     21#if defined HAVE_DLFCN_H
    2222#   include <dlfcn.h>
    2323#   define NEW(x) x
     
    3535                abort(); \
    3636        } while(0)
    37 #else
     37#elif defined _WIN32
    3838#   define NEW(x) x##_new
    3939#   define LOADSYM(x) \
     
    5757                    table_win32[];
    5858
     59#else
     60#   error no function diversion system for this platform
    5961#endif
     62
  • zzuf/trunk/src/libzzuf/lib-stream.c

    r4655 r4657  
    11481148
    11491149/* Win32 function table */
     1150#if defined _WIN32
    11501151zzuf_table_t table_stream[] =
    11511152{
     
    11551156    DIVERT_END
    11561157};
     1158#endif
     1159
  • zzuf/trunk/src/libzzuf/lib-win32.c

    r4656 r4657  
    1717#include "config.h"
    1818
     19#if defined HAVE_STDINT_H
     20#   include <stdint.h>
     21#elif defined HAVE_INTTYPES_H
     22#   include <inttypes.h>
     23#endif
     24
     25#include <stdio.h>
     26
    1927#if defined HAVE_WINDOWS_H
    2028#   include <windows.h>
    2129#endif
    22 
    23 #include <stdio.h>
    2430
    2531#include "common.h"
     
    3844#endif
    3945
     46#if defined HAVE_CREATEFILE
    4047HANDLE NEW(CreateFileA)(LPCTSTR lpFileName, DWORD dwDesiredAccess,
    4148           DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes,
     
    4855                             dwFlagsAndAttributes, hTemplateFile);
    4956}
     57#endif
    5058
    5159/* Win32 function table */
     60#if defined _WIN32
    5261zzuf_table_t table_win32[] =
    5362{
     
    5766    DIVERT_END
    5867};
     68#endif
    5969
Note: See TracChangeset for help on using the changeset viewer.