~steve-sk2/mingw-w64/oneiric

« back to all changes in this revision

Viewing changes to mingw-w64-headers/crt/sec_api/stralign_s.h

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Kitt
  • Date: 2010-11-18 00:04:46 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101118000446-xe24b423su55onyl
Tags: 1.0+20101003-1
* New maintainer. (Closes: #594371.)
* New upstream snapshot:
  - Includes getopt.h. (Closes: #569914.)
* Build g++ for Win64. (Closes: #600451.)
* Standards-Version 3.9.1 (new packaging).
* Include patch from
  http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64?view=revision&revision=3715
  as suggested by Rafaël Carré.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * This file has no copyright assigned and is placed in the Public Domain.
3
 
 * This file is part of the w64 mingw-runtime package.
4
 
 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5
 
 */
6
 
#ifndef __STRALIGN_H_S_
7
 
#define __STRALIGN_H_S_
8
 
 
9
 
#include <stralign.h>
10
 
 
11
 
#if defined(MINGW_HAS_SECURE_API)
12
 
 
13
 
#ifdef __cplusplus
14
 
extern "C" {
15
 
#endif
16
 
 
17
 
#if !defined(I_X86_) && defined(_WSTRING_S_DEFINED)
18
 
#if defined(__cplusplus) && defined(_WConst_Return)
19
 
  static __inline PUWSTR ua_wcscpy_s(PUWSTR Destination,size_t DestinationSize,PCUWSTR Source) {
20
 
    if(WSTR_ALIGNED(Source) && WSTR_ALIGNED(Destination)) return (wcscpy_s((PWSTR)Destination,DestinationSize,(PCWSTR)Source)==0 ? Destination : NULL);
21
 
    return uaw_wcscpy((PCUWSTR)String,Character);
22
 
  }
23
 
#endif
24
 
#endif
25
 
 
26
 
#ifdef __cplusplus
27
 
}
28
 
#endif
29
 
#endif
30
 
#endif