Skip to content

Commit

Permalink
fix ocaml patch
Browse files Browse the repository at this point in the history
  • Loading branch information
serp256 committed Oct 1, 2012
1 parent 2260ab0 commit 495883e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
32 changes: 23 additions & 9 deletions ocaml/ocaml-4.00.0.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
diff -urN ocaml-4.00/otherlibs/threads/pervasives.ml ocaml-4.00-main/otherlibs/threads/pervasives.ml
--- ocaml-4.00/otherlibs/threads/pervasives.ml 2012-04-26 23:17:59.000000000 +0400
+++ ocaml-4.00-main/otherlibs/threads/pervasives.ml 2012-05-17 14:46:50.000000000 +0400
diff -urN ocaml-4.00.0/asmrun/amd64.S ocaml-4.00.0-main/asmrun/amd64.S
--- ocaml-4.00.0/asmrun/amd64.S 2012-07-09 12:35:23.000000000 +0400
+++ ocaml-4.00.0-main/asmrun/amd64.S 2012-08-02 15:45:38.000000000 +0400
@@ -485,7 +485,10 @@
movq %rax, C_ARG_1 /* arg 1: exception bucket */
movq 0(%rsp), C_ARG_2 /* arg 2: pc of raise */
leaq 8(%rsp), C_ARG_3 /* arg 3: sp of raise */
+ popq C_ARG_2 /* arg 2: pc of raise */
+ movq %rsp, C_ARG_3 /* arg 3: sp at raise */
movq %r14, C_ARG_4 /* arg 4: sp of handler */
+ /* PR#5700: thanks to popq above, stack is now 16-aligned */
PREPARE_FOR_C_CALL /* no need to cleanup after */
call GCALL(caml_stash_backtrace)
movq %r12, %rax /* Recover exception bucket */
diff -urN ocaml-4.00.0/otherlibs/threads/pervasives.ml ocaml-4.00.0-main/otherlibs/threads/pervasives.ml
--- ocaml-4.00.0/otherlibs/threads/pervasives.ml 2011-07-27 18:17:02.000000000 +0400
+++ ocaml-4.00.0-main/otherlibs/threads/pervasives.ml 2012-08-02 11:38:03.000000000 +0400
@@ -87,29 +87,34 @@
external (-.) : float -> float -> float = "%subfloat"
external ( *. ) : float -> float -> float = "%mulfloat"
Expand Down Expand Up @@ -58,9 +72,9 @@ diff -urN ocaml-4.00/otherlibs/threads/pervasives.ml ocaml-4.00-main/otherlibs/t
external frexp : float -> float * int = "caml_frexp_float"
external ldexp : float -> int -> float = "caml_ldexp_float"
external modf : float -> float * float = "caml_modf_float"
diff -urN ocaml-4.00/stdlib/pervasives.ml ocaml-4.00-main/stdlib/pervasives.ml
--- ocaml-4.00/stdlib/pervasives.ml 2012-04-26 23:17:52.000000000 +0400
+++ ocaml-4.00-main/stdlib/pervasives.ml 2012-05-17 14:45:56.000000000 +0400
diff -urN ocaml-4.00.0/stdlib/pervasives.ml ocaml-4.00.0-main/stdlib/pervasives.ml
--- ocaml-4.00.0/stdlib/pervasives.ml 2012-01-12 19:46:51.000000000 +0400
+++ ocaml-4.00.0-main/stdlib/pervasives.ml 2012-08-02 11:38:03.000000000 +0400
@@ -83,31 +83,34 @@
external ( -. ) : float -> float -> float = "%subfloat"
external ( *. ) : float -> float -> float = "%mulfloat"
Expand Down Expand Up @@ -118,9 +132,9 @@ diff -urN ocaml-4.00/stdlib/pervasives.ml ocaml-4.00-main/stdlib/pervasives.ml
external frexp : float -> float * int = "caml_frexp_float"
external ldexp : float -> int -> float = "caml_ldexp_float"
external modf : float -> float * float = "caml_modf_float"
diff -urN ocaml-4.00/stdlib/pervasives.mli ocaml-4.00-main/stdlib/pervasives.mli
--- ocaml-4.00/stdlib/pervasives.mli 2012-05-05 17:00:39.000000000 +0400
+++ ocaml-4.00-main/stdlib/pervasives.mli 2012-05-17 14:45:56.000000000 +0400
diff -urN ocaml-4.00.0/stdlib/pervasives.mli ocaml-4.00.0-main/stdlib/pervasives.mli
--- ocaml-4.00.0/stdlib/pervasives.mli 2012-05-02 18:39:52.000000000 +0400
+++ ocaml-4.00.0-main/stdlib/pervasives.mli 2012-08-02 11:38:03.000000000 +0400
@@ -261,82 +261,84 @@
external ( /. ) : float -> float -> float = "%divfloat"
(** Floating-point division. *)
Expand Down
3 changes: 2 additions & 1 deletion src/ios/LightAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
self.window = [[UIWindow alloc] initWithFrame: [UIScreen mainScreen].applicationFrame];
lightViewController = [LightViewController sharedInstance];
lightViewController.orientationDelegate = self;
//[self.window addSubview:lightViewController.view];
self.window.rootViewController = lightViewController;
[self.window makeKeyAndVisible];
[self.window addSubview:lightViewController.view];
return YES;
}

Expand Down
5 changes: 5 additions & 0 deletions src/ios/LightViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ -(void)hideActivityIndicator {


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
NSLog(@"Controller shouldAutorotateToInterface called");
if (_orientationDelegate) {
BOOL res = [_orientationDelegate shouldAutorotateToInterfaceOrientation:interfaceOrientation];
return res;
Expand All @@ -256,7 +257,9 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

/*
- (BOOL)shouldAutorotate {
NSLog(@"Controller shouldAutorotate called");
if (_orientationDelegate && [_orientationDelegate respondsToSelector:@selector(shouldAutorotate)]) {
return [_orientationDelegate shouldAutorotate];
}
Expand All @@ -265,12 +268,14 @@ - (BOOL)shouldAutorotate {
}
- (NSUInteger)supportedInterfaceOrientations {
NSLog(@"Controller supportedOrientations called");
if (_orientationDelegate && [_orientationDelegate respondsToSelector:@selector(supportedInterfaceOrientations)]) {
return [_orientationDelegate supportedInterfaceOrientations];
}
else
return UIInterfaceOrientationPortrait;
}
*/


/* handle payment transactions */
Expand Down

0 comments on commit 495883e

Please sign in to comment.