Skip to content

Commit

Permalink
* Makefile.am: Rewrite. Remove configure-generated warnings about
Browse files Browse the repository at this point in the history
    multiple _LIBADD and _SOURCES lines.  Add support for Win32.
    Win32 support is limited to ANSI C functions.
  * stdio.c: Don't compile Unix wrappers on Win32.

svn path=/trunk/mono/; revision=38308
  • Loading branch information
Jonathan Pryor committed Jan 4, 2005
1 parent 7bfb061 commit 35562ae
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 17 deletions.
7 changes: 7 additions & 0 deletions support/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2005-01-04 Jonathan Pryor <[email protected]>

* Makefile.am: Rewrite. Remove configure-generated warnings about
multiple _LIBADD and _SOURCES lines. Add support for Win32.
Win32 support is limited to ANSI C functions.
* stdio.c: Don't compile Unix wrappers on Win32.

2005-01-04 Raja R Harinath <[email protected]>

* Makefile.am (LIBS): Remove. Was overriding results of configure check.
Expand Down
54 changes: 37 additions & 17 deletions support/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
if PLATFORM_WIN32
lib_LTLIBRARIES=
else
lib_LTLIBRARIES= libMonoPosixHelper.la
endif

INCLUDES = \
$(GLIB_CFLAGS) \
-I$(top_srcdir)

MPH_SOURCE = \
mph.h \
old-map.h \
map.h \
# Source code which helps implement the ANSI C standards, and thus *should* be
# portable to any platform having a C compiler.
MPH_C_SOURCE = \
map.c \
map.h \
mph.h \
signal.c \
stdio.c \
stdlib.c

# Source code which helps implement POSIX and other related Unix standards,
# and *may* be portable between Unix platforms.
MPH_UNIX_SOURCE = \
dirent.c \
errno.c \
fcntl.c \
fstab.c \
grp.c \
macros.c \
map.c \
pwd.c \
old-map.c \
old-map.h \
pwd.c \
serial.c \
signal.c \
stdio.c \
stdlib.c \
sys-mman.c \
sys-sendfile.c \
sys-stat.c \
Expand All @@ -36,14 +38,32 @@ MPH_SOURCE = \
utime.c \
x-struct-str.c

if PLATFORM_WIN32
MPH_SOURCE = $(MPH_C_SOURCE)
MPH_LIBS =
else
MPH_SOURCE = $(MPH_C_SOURCE) $(MPH_UNIX_SOURCE)
MPH_LIBS = $(GLIB_LIBS)
endif

if HAVE_ZLIB
libMonoPosixHelper_la_SOURCES = $(MPH_SOURCE) zlib_macros.c
libMonoPosixHelper_la_LIBADD = $(GLIB_LIBS) -lz
Z_SOURCE = \
zlib_macros.c
Z_LIBS = \
-lz
else
libMonoPosixHelper_la_SOURCES = $(MPH_SOURCE)
libMonoPosixHelper_la_LIBADD = $(GLIB_LIBS)
Z_SOURCE =
Z_LIBS =
endif

libMonoPosixHelper_la_SOURCES = \
$(MPH_SOURCE) \
$(Z_SOURCE)

libMonoPosixHelper_la_LIBADD = \
$(MPH_LIBS) \
$(Z_LIBS)

libMonoPosixHelper_la_LDFLAGS = -no-undefined -version-info 1:0:1

#
Expand Down
2 changes: 2 additions & 0 deletions support/stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

G_BEGIN_DECLS

#ifndef PLATFORM_WIN32
gint32
Mono_Posix_Syscall_L_ctermid (void)
{
Expand All @@ -25,6 +26,7 @@ Mono_Posix_Syscall_L_cuserid (void)
{
return L_cuserid;
}
#endif /* ndef PLATFORM_WIN32 */

mph_size_t
Mono_Posix_Stdlib_fread (void *ptr, mph_size_t size, mph_size_t nmemb, FILE *stream)
Expand Down

0 comments on commit 35562ae

Please sign in to comment.