mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-07 06:50:24 +08:00
* wincap.cc: New file.
* wincap.h: New file. * Makefile.in: Accomodate having our own wincap implementation now.
This commit is contained in:
parent
0ae86d187c
commit
f68671330f
@ -1,3 +1,9 @@
|
|||||||
|
2006-01-12 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* wincap.cc: New file.
|
||||||
|
* wincap.h: New file.
|
||||||
|
* Makefile.in: Accomodate having our own wincap implementation now.
|
||||||
|
|
||||||
2006-01-09 Corinna Vinschen <corinna@vinschen.de>
|
2006-01-09 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
Check FreeBSD upstream changes and apply important patches.
|
Check FreeBSD upstream changes and apply important patches.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Makefile for Cygwin server
|
# Makefile for Cygwin server
|
||||||
# Copyright 2003 Red Hat, Inc.
|
# Copyright 2003, 2006 Red Hat, Inc.
|
||||||
|
|
||||||
# This file is part of Cygwin.
|
# This file is part of Cygwin.
|
||||||
|
|
||||||
@ -40,11 +40,10 @@ override CXXFLAGS+=-MMD -DHAVE_DECL_GETOPT=0 -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="
|
|||||||
OBJS:= cygserver.o client.o process.o msg.o sem.o shm.o threaded_queue.o \
|
OBJS:= cygserver.o client.o process.o msg.o sem.o shm.o threaded_queue.o \
|
||||||
transport.o transport_pipes.o transport_sockets.o \
|
transport.o transport_pipes.o transport_sockets.o \
|
||||||
bsd_helper.o bsd_log.o bsd_mutex.o \
|
bsd_helper.o bsd_log.o bsd_mutex.o \
|
||||||
sysv_msg.o sysv_sem.o sysv_shm.o
|
sysv_msg.o sysv_sem.o sysv_shm.o wincap.o
|
||||||
LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
|
LIBOBJS:=${patsubst %.o,lib%.o,$(OBJS)}
|
||||||
|
|
||||||
CYGWIN_OBJS:=$(cygwin_build)/smallprint.o $(cygwin_build)/version.o \
|
CYGWIN_OBJS:=$(cygwin_build)/smallprint.o $(cygwin_build)/version.o
|
||||||
$(cygwin_build)/wincap.o
|
|
||||||
|
|
||||||
CYGWIN_LIB:=$(cygwin_build)/libcygwin.a
|
CYGWIN_LIB:=$(cygwin_build)/libcygwin.a
|
||||||
|
|
||||||
|
23
winsup/cygserver/wincap.cc
Normal file
23
winsup/cygserver/wincap.cc
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/* wincap.cc -- figure out on which OS we're running.
|
||||||
|
Lightweight version for Cygserver
|
||||||
|
|
||||||
|
Copyright 2006 Red Hat, Inc.
|
||||||
|
|
||||||
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
This software is a copyrighted work licensed under the terms of the
|
||||||
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
|
details. */
|
||||||
|
|
||||||
|
#include "woutsup.h"
|
||||||
|
|
||||||
|
wincapc wincap;
|
||||||
|
|
||||||
|
void
|
||||||
|
wincapc::init ()
|
||||||
|
{
|
||||||
|
memset (&version, 0, sizeof version);
|
||||||
|
/* Request simple version info. */
|
||||||
|
version.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
|
||||||
|
GetVersionEx (&version);
|
||||||
|
}
|
30
winsup/cygserver/wincap.h
Normal file
30
winsup/cygserver/wincap.h
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/* wincap.h: Header for OS capability class.
|
||||||
|
Lightweight version for Cygserver.
|
||||||
|
|
||||||
|
Copyright 2006 Red Hat, Inc.
|
||||||
|
|
||||||
|
This file is part of Cygwin.
|
||||||
|
|
||||||
|
This software is a copyrighted work licensed under the terms of the
|
||||||
|
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
|
||||||
|
details. */
|
||||||
|
|
||||||
|
#ifndef _CYGSERVER_WINCAP_H
|
||||||
|
#define _CYGSERVER_WINCAP_H
|
||||||
|
|
||||||
|
class wincapc
|
||||||
|
{
|
||||||
|
OSVERSIONINFO version;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void init ();
|
||||||
|
|
||||||
|
bool is_winnt () const
|
||||||
|
{ return version.dwPlatformId == VER_PLATFORM_WIN32_NT; }
|
||||||
|
bool has_security () const
|
||||||
|
{ return version.dwPlatformId == VER_PLATFORM_WIN32_NT; }
|
||||||
|
};
|
||||||
|
|
||||||
|
extern wincapc wincap;
|
||||||
|
|
||||||
|
#endif /* _CYGSERVER_WINCAP_H */
|
Loading…
x
Reference in New Issue
Block a user