Commit Graph

430 Commits

Author SHA1 Message Date
Ankit Aggarwal
e7a6ce07ab [GlibcModuleMap] Add sys/file.h to glibc modulemap 2016-10-05 12:35:47 +05:30
K Staring
69085ae4eb Merge branch 'master' of https://github.com/apple/swift 2016-09-29 07:24:25 +02:00
Max Moiseev
6803cda05c Merge branch 'master' into new-integer-protocols 2016-09-26 11:39:46 -07:00
Maxim Moiseev
69b3cc0946 [overlay] Declaring MAP_FAILED (#4971)
Clang importer is unable to handle `((void *)-1)`, therefore manually
declaring the said constant in both Darwin and Glibc modules.

rdar://problem/26689135
2016-09-23 14:48:48 -07:00
K Staring
7edc3100bf fix unbalanced '% if'/'% end', found by gribozavr 2016-09-22 20:28:10 +02:00
Max Moiseev
ea8e0f0e15 Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-09-21 14:48:35 -07:00
swift-ci
88741f93c6 Merge pull request #4899 from Nirma/gardening_mach_error 2016-09-21 10:42:24 -07:00
Nicholas Maccharoli
384b2e3b83 [gardening] fix enum value spacing 2016-09-21 18:03:22 +09:00
K Staring
7c50ccde5e fix cut/paste typo 'CMAKE_SDK != "FreeBSD"' to 'CMAKE_SDK in ["FreeBSD"]' (assuming some time more kqueue-supported platforms will want to support Swift) 2016-09-20 03:53:36 +02:00
K Staring
98a8b58957 add //FIXME for FreeBSD outcommented code, add sys/event.h for kqueue (untested) 2016-09-20 03:46:35 +02:00
K Staring
b267fda3c8 Merge branch 'master' of https://github.com/apple/swift 2016-09-18 13:09:34 +02:00
practicalswift
3a4ee89034 [gardening] Use consistent formatting. 2016-09-17 12:12:49 +02:00
K Staring
4dbf4de036 don't try to link "dl" on FreeBSD 2016-09-16 20:49:22 +02:00
Amr Aboelela
dbca4f031a Added module ifaddrs 2016-09-14 17:47:11 -07:00
K Staring
afc95a5e2a disable handy pthread wrappers on FreeBSD since they don't compile
Things like: PthreadBarriers.swift:114:50: error: cannot convert value of type 'UnsafeMutablePointer<pthread_mutex_t>' (aka 'UnsafeMutablePointer<OpaquePointer>') to expected argument type 'UnsafeMutablePointer<pthread_mutex_t?>' (aka 'UnsafeMutablePointer<Optional<OpaquePointer>>')
on barrier.pointee.mutex . I need to do more research to understand this
2016-09-13 11:08:00 +02:00
Michael Gottesman
739874c08b [cmake][gardening] Eliminate a level of indentation by inverting a conditional and using continue. 2016-08-28 14:41:43 -07:00
Paulo Faria
1ed756ec84 Add sendfile to Glibc 2016-08-21 17:43:20 -07:00
Dave Abrahams
011c280383 Merge pull request #4065 from apple/withVaList
Prefer withVaList over getVaList
2016-08-07 11:06:03 -07:00
Dave Abrahams
8d3ac46448 Prefer withVaList over getVaList 2016-08-06 06:48:13 -07:00
Dmitri Gribenko
92d19ae7e9 Merge pull request #3926 from aciidb0mb3r/pty_glibc
Add pty to Glibc modulemap
2016-08-05 00:52:48 -07:00
Ankit Agarwal
d86e8b7d14 Add pty to Glibc modulemap 2016-08-05 09:07:25 +05:30
Michael Gottesman
06a70d3942 [cmake] Add cmake support for only applying tsan to the swift stdlib/runtime. 2016-08-03 17:53:57 -07:00
Maxim Moiseev
d42743f985 removing IntegerArithmetic.swift 2016-07-29 13:31:21 +03:00
Saleem Abdulrasool
4ce4157037 stdlib: remove unnecessary externs in definitions
The definition may be tagged with `extern`, however, this does nothing.  In the
header, it may be used to indicate to other TUs that the definition is external
to the TU.  Remove the unnecessary modifier.  NFC.
2016-07-27 21:16:15 -07:00
Bob Wilson
58395b3b2f [SE-0127] Add "to:" argument label to withUnsafe[Mutable]Pointer.
rdar://problem/26529498
2016-07-26 17:44:33 -07:00
Andrew Trick
a18d490d6a Migrate from UnsafePointer<Void> to UnsafeRawPointer. (#3773)
* Migrate from `UnsafePointer<Void>` to `UnsafeRawPointer`.

As proposed in SE-0107: UnsafeRawPointer.

`void*` imports as `UnsafeMutableRawPointer`.
`const void*` imports as `UnsafeRawPointer`.

Occurrences of `UnsafePointer<Void>` are replaced with UnsafeRawPointer.

* Migrate overlays from UnsafePointer<Void> to UnsafeRawPointer.

This requires explicit memory binding in several places,
particularly in NSData and CoreAudio.

* Fix a bunch of test cases for Void->Raw migration.

* qsort takes IUO values

* Bridge `Unsafe[Mutable]RawPointer as `void [const] *`.

* Parse #dsohandle as UnsafeMutableRawPointer

* Update a bunch of test cases for Void->Raw migration.

* Trivial fix for the SceneKit test case.

* Add an UnsafeRawPointer self initializer.

This is unfortunately necessary for assignment between types imported from C.

* Tiny simplification of the initializer.
2016-07-26 14:21:15 -07:00
Andrew Trick
0ed9ee8dee Revert "Migrate from UnsafePointer<Void> to UnsafeRawPointer. (#3724)"
This reverts commit ece0951924.

This results in lldb failues on linux that I can't readily debug.
Backing out until they can be resolved.
2016-07-26 02:50:57 -07:00
Andrew Trick
ece0951924 Migrate from UnsafePointer<Void> to UnsafeRawPointer. (#3724)
* Migrate from `UnsafePointer<Void>` to `UnsafeRawPointer`.

As proposed in SE-0107: UnsafeRawPointer.

`void*` imports as `UnsafeMutableRawPointer`.
`const void*` imports as `UnsafeRawPointer`.

Occurrences of `UnsafePointer<Void>` are replaced with UnsafeRawPointer.

* Migrate overlays from UnsafePointer<Void> to UnsafeRawPointer.

This requires explicit memory binding in several places,
particularly in NSData and CoreAudio.

* Fix a bunch of test cases for Void->Raw migration.

* qsort takes IUO values

* Bridge `Unsafe[Mutable]RawPointer as `void [const] *`.

* Parse #dsohandle as UnsafeMutableRawPointer

* Update a bunch of test cases for Void->Raw migration.

* Trivial fix for the SceneKit test case.

* Add an UnsafeRawPointer self initializer.

This is unfortunately necessary for assignment between types imported from C.

* Tiny simplification of the initializer.
2016-07-26 02:18:21 -07:00
Arnold Schwaighofer
d7856e2ab1 dprintf's format argument is read-only
SR-1958
2016-07-20 07:14:20 -07:00
Chris Lattner
a0d34852bb Revert "Fix the build."
This reverts commit 932fe9d6b9.
2016-07-17 12:35:42 -07:00
Michael Gottesman
932fe9d6b9 Fix the build.
This reverts commit 4242af7503.
This reverts commit 76cf339694.
This reverts commit e97ed133a8.
This reverts commit 66961fcda8.
2016-07-17 01:02:48 -07:00
Chris Lattner
76cf339694 Implement the first half of SE-0109: Remove the Boolean protocol
This removes conformance of DarwinBool and ObjCBool to the Boolean protocol,
and makes the &&/||/! operators be concrete w.r.t. Bool instead of abstract
on Boolean.

This fixes some outstanding bugs w.r.t diagnostics, but exposes some cases
where an existing diagnostic is not great.  I'll fix that in a later patch
(tracked by rdar://27391581).
2016-07-16 23:23:45 -07:00
Saleem Abdulrasool
1689363786 stdlib: shim errno access
errno is implemented as a macro in many environments.  The accessor hidden
behind the macro is not a standard function, so we ended up with an
implementation specific handling across all the targets.  Shim the function in C
where it can be hidden behind the CPP.  This simplifies the implementation on
the swift side.
2016-07-15 22:16:27 -07:00
Dmitri Gribenko
61fcdf5fcf Merge pull request #3527 from practicalswift/gardening-20160715
[gardening] Header fixes. Don't compare to false.
2016-07-15 13:12:17 -07:00
Stephen Canon
cc024d0710 Generic implementations of math functions implementable on FloatingPoint. (#3524)
Replace the non-generic tgmath functions with generic <T: FloatingPoint> implementations where possible, and move the global sqrt() operation into tgmath.
2016-07-15 08:19:08 -04:00
practicalswift
68af19b6b8 [gardening] Fix incorrect header filenames 2016-07-15 10:23:42 +02:00
Dmitri Gribenko
0e838c4bbe Merge pull request #3428 from compnerd/msvc
Platform: port to msvcrt, add msvcrt module
2016-07-13 14:10:47 -07:00
Saleem Abdulrasool
a05fd17b64 Platform: port to msvcrt, add msvcrt module
This adds the swiftMSVCRT module which is similar in spirit to swiftGlibc and
swiftDarwin, exposing the Microsoft C Runtime library to swift.  Furthermore,
disable pieces of the standard library which are not immediately trivially
portable to Windows.  A lot of this functionality can still be implemented and
exposed to the user, however, this is the quickest means to a PoC for native
windows support.

As a temporary solution, add a -DCYGWIN flag to indicate that we are building
for the cygwin windows target.  This allows us to continue supporting the cygwin
environment whilst making the windows port work natively against the windows
environment (msvc).  Eventually, that will hopefully be replaced with an
environment check in swift.
2016-07-12 17:31:06 -07:00
Robert Widmann
f97e5dcb0e [SE-0115][1/2] Rename *LiteralConvertible protocols to ExpressibleBy*Literal. This
change includes both the necessary protocol updates and the deprecation
warnings
suitable for migration.  A future patch will remove the renamings and
make this
a hard error.
2016-07-12 15:25:24 -07:00
Doug Gregor
fcd5d07c20 [Grand renaming] Rename MachError constants to lowerCamelCase. 2016-07-12 10:53:52 -07:00
Doug Gregor
b1777b194c [SE-0112] Teach MachError to store the underlying NSError.
The error code is now specified by MachErrorCode.
2016-07-12 10:53:52 -07:00
Doug Gregor
d3f077e46d [SE-0112] Teach POSIXError to store the underlying NSError.
The error code is now specified by POSIXErrorCode.
2016-07-12 10:53:52 -07:00
Saleem Abdulrasool
25d7707fde stdlib: build multiple platform libraries simultaneously
Always construct the platform libraries for all the target SDKs.  This enables
us to build the right set for targets and will also enable us to cross-compile
multiple targets simultaneously.
2016-07-05 17:32:38 -07:00
swift-ci
fe13e6c0e3 Merge pull request #2905 from frootloops/int32 2016-07-01 19:10:12 -07:00
Umberto Raimondi
bd1a6aeb01 stdlib: added Tty ioctl constants for Darwin/FreeBSD 2016-07-01 17:00:04 -04:00
Saleem Abdulrasool
83901998c9 Port for PS4
Add support for the PS4 OS.  Update the standard library and add a target unit
test.
2016-06-30 20:14:50 -07:00
Max Moiseev
38be253c30 Moving the doc comments on the line above the declaration.
This fixes the documentation displayed in XCode.
2016-06-24 18:31:15 -07:00
Alsey Coleman Miller
ff33f3bb74 Added CUUID to Glibc
Necessary for SR-1756 and SE-0069
2016-06-21 13:48:15 -05:00
Brian Gesiak
328de9e280 [SR-1738] add_swift_library takes SHARED/STATIC arg
As a first step to allowing the build script to build *only*
static library versions of the stdlib, change `add_swift_library`
such that callers must pass in `SHARED`, `STATIC`, or `OBJECT_LIBRARY`.

Ideally, only these flags would be used to determine whether to
build shared, static, or object libraries, but that is not currently
the case -- `add_swift_library` also checks whether the library
`IS_STDLIB` before performing certain additional actions. This will be
cleaned up in a future commit.
2016-06-16 13:15:58 -04:00
Mishal Shah
87b7bcfd3e Update master to build with Xcode 8 beta 1, OS X 10.12, iOS 10, tvOS 10, and watchOS 3 SDKs. 2016-06-14 14:53:55 -07:00