Add header guard to prevent multiple inclusion errors

--- IPCalculator/IPAddress.h
+++ IPCalculator/IPAddress.h
@@ -1,3 +1,6 @@
+#ifndef _IP_ADDRESS_H_
+#define _IP_ADDRESS_H_
+
 #include <iostream>

 // An IPv4 address has the following form:
@@ -24,3 +27,5 @@
      unsigned char m_c;
      unsigned char m_d;
 };
+
+#endif // _IPADDRESS_H_

<|original_code|>
#include <iostream>

// An IPv4 address has the following form:
// "A.B.C.D", where A, B, C and D are bytes
class IPAddress {
 public:
     IPAddress (unsigned char a = 0, unsigned char b = 0, unsigned char c = 0, unsigned char d = 0);

     IPAddress operator& (const IPAddress& addr) const;
     IPAddress operator| (const IPAddress& addr) const;
     IPAddress operator~ () const;

     bool operator== (const IPAddress& addr) const;
     bool operator!= (const IPAddress& addr) const;

     friend std::ostream& operator<< (std::ostream& os, const IPAddress& addr);
     friend std::istream& operator>> (std::istream& is, IPAddress& addr);

     void setAddress (unsigned char a, unsigned char b, unsigned char c, unsigned char d);

 private:
     unsigned char m_a;
     unsigned char m_b;
     unsigned char m_c;
     unsigned char m_d;
};
<|edits_diff|>
--- IPCalculator/IPAddress.h
+++ IPCalculator/IPAddress.h
@@ -24,3 +24,5 @@
      unsigned char m_c;
      unsigned char m_d;
 };
+
+#endif // _IPADDRESS_H_
<|current_version|>
#include <iostream>

// An IPv4 address has the following form:
// "A.B.C.D", where A, B, C and D are bytes
class IPAddress {
 public:
     IPAddress (unsigned char a = 0, unsigned char b = 0, unsigned char c = 0, unsigned char d = 0);

     IPAddress operator& (const IPAddress& addr) const;
     IPAddress operator| (const IPAddress& addr) const;
     IPAddress operator~ () const;

     bool operator== (const IPAddress& addr) const;
     bool operator!= (const IPAddress& addr) const;

     friend std::ostream& operator<< (std::ostream& os, const IPAddress& addr);
     friend std::istream& operator>> (std::istream& is, IPAddress& addr);

     void setAddress (unsigned char a, unsigned char b, unsigned char c, unsigned char d);

 private:
     unsigned char m_a;
     unsigned char m_b;
     unsigned char m_c;
     unsigned char m_d;
};

#endif // _IPADDRESS_H_
<|next_version|>
#ifndef _IP_ADDRESS_H_
#define _IP_ADDRESS_H_

#include <iostream>

// An IPv4 address has the following form:
// "A.B.C.D", where A, B, C and D are bytes
class IPAddress {
 public:
     IPAddress (unsigned char a = 0, unsigned char b = 0, unsigned char c = 0, unsigned char d = 0);

     IPAddress operator& (const IPAddress& addr) const;
     IPAddress operator| (const IPAddress& addr) const;
     IPAddress operator~ () const;

     bool operator== (const IPAddress& addr) const;
     bool operator!= (const IPAddress& addr) const;

     friend std::ostream& operator<< (std::ostream& os, const IPAddress& addr);
     friend std::istream& operator>> (std::istream& is, IPAddress& addr);

     void setAddress (unsigned char a, unsigned char b, unsigned char c, unsigned char d);

 private:
     unsigned char m_a;
     unsigned char m_b;
     unsigned char m_c;
     unsigned char m_d;
};

#endif // _IPADDRESS_H_


Add property for search item object

Add property for search item object

--- bikepath/SearchItem.h
+++ bikepath/SearchItem.h
@@ -8,6 +8,10 @@

 #import <Foundation/Foundation.h>

+
 @interface SearchItem : NSObject

+@property NSString *searchQuery;
+@property (readonly) NSDate *creationDate;
+
 @end

<|original_code|>
//
//  SearchItem.h
//  bikepath
//
//  Created by Farheen Malik on 8/15/14.
//  Copyright (c) 2014 Bike Path. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface SearchItem : NSObject

@end

<|edits_diff|>
--- bikepath/SearchItem.h
+++ bikepath/SearchItem.h
@@ -8,6 +8,7 @@

 #import <Foundation/Foundation.h>

+
 @interface SearchItem : NSObject

 @end
<|current_version|>
//
//  SearchItem.h
//  bikepath
//
//  Created by Farheen Malik on 8/15/14.
//  Copyright (c) 2014 Bike Path. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface SearchItem : NSObject

@end

<|next_version|>
//
//  SearchItem.h
//  bikepath
//
//  Created by Farheen Malik on 8/15/14.
//  Copyright (c) 2014 Bike Path. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface SearchItem : NSObject

@property NSString *searchQuery;
@property (readonly) NSDate *creationDate;

@end


Test attribute merging for the availability attribute.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@128334 91177308-0d34-0410-b5e6-96231b3b80d8

--- test/Sema/attr-availability-ios.c
+++ test/Sema/attr-availability-ios.c
@@ -6,10 +6,16 @@
 void f3(int) __attribute__((availability(ios,introduced=3.0)));
 void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=2.1,obsoleted=3.0))); // expected-note{{explicitly marked unavailable}}

+void f5(int) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(ios,deprecated=3.0)));
+void f6(int) __attribute__((availability(ios,deprecated=3.0)));
+void f6(int) __attribute__((availability(ios,introduced=2.0)));
+
 void test() {
   f0(0); // expected-warning{{'f0' is deprecated: first deprecated in iOS 2.1}}
   f1(0);
   f2(0); // expected-warning{{'f2' is deprecated: first deprecated in iOS 3.0}}
   f3(0);
   f4(0); // expected-error{{f4' is unavailable: obsoleted in iOS 3.0}}
+  f5(0); // expected-warning{{'f5' is deprecated: first deprecated in iOS 3.0}}
+  f6(0); // expected-warning{{'f6' is deprecated: first deprecated in iOS 3.0}}
 }

<|original_code|>
// RUN: %clang_cc1 "-triple" "x86_64-apple-darwin3.0.0-iphoneos" -fsyntax-only -verify %s

void f0(int) __attribute__((availability(ios,introduced=2.0,deprecated=2.1)));
void f1(int) __attribute__((availability(ios,introduced=2.1)));
void f2(int) __attribute__((availability(ios,introduced=2.0,deprecated=3.0)));
void f3(int) __attribute__((availability(ios,introduced=3.0)));
void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=2.1,obsoleted=3.0))); // expected-note{{explicitly marked unavailable}}

void test() {
  f0(0); // expected-warning{{'f0' is deprecated: first deprecated in iOS 2.1}}
  f1(0);
  f2(0); // expected-warning{{'f2' is deprecated: first deprecated in iOS 3.0}}
  f3(0);
  f4(0); // expected-error{{f4' is unavailable: obsoleted in iOS 3.0}}
}

<|edits_diff|>
--- test/Sema/attr-availability-ios.c
+++ test/Sema/attr-availability-ios.c
@@ -6,6 +6,10 @@
 void f3(int) __attribute__((availability(ios,introduced=3.0)));
 void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=2.1,obsoleted=3.0))); // expected-note{{explicitly marked unavailable}}

+void f5(int) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(ios,deprecated=3.0)));
+void f6(int) __attribute__((availability(ios,deprecated=3.0)));
+void f6(int) __attribute__((availability(ios,introduced=2.0)));
+
 void test() {
   f0(0); // expected-warning{{'f0' is deprecated: first deprecated in iOS 2.1}}
   f1(0);
<|current_version|>
// RUN: %clang_cc1 "-triple" "x86_64-apple-darwin3.0.0-iphoneos" -fsyntax-only -verify %s

void f0(int) __attribute__((availability(ios,introduced=2.0,deprecated=2.1)));
void f1(int) __attribute__((availability(ios,introduced=2.1)));
void f2(int) __attribute__((availability(ios,introduced=2.0,deprecated=3.0)));
void f3(int) __attribute__((availability(ios,introduced=3.0)));
void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=2.1,obsoleted=3.0))); // expected-note{{explicitly marked unavailable}}

void f5(int) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(ios,deprecated=3.0)));
void f6(int) __attribute__((availability(ios,deprecated=3.0)));
void f6(int) __attribute__((availability(ios,introduced=2.0)));

void test() {
  f0(0); // expected-warning{{'f0' is deprecated: first deprecated in iOS 2.1}}
  f1(0);
  f2(0); // expected-warning{{'f2' is deprecated: first deprecated in iOS 3.0}}
  f3(0);
  f4(0); // expected-error{{f4' is unavailable: obsoleted in iOS 3.0}}
}

<|next_version|>
// RUN: %clang_cc1 "-triple" "x86_64-apple-darwin3.0.0-iphoneos" -fsyntax-only -verify %s

void f0(int) __attribute__((availability(ios,introduced=2.0,deprecated=2.1)));
void f1(int) __attribute__((availability(ios,introduced=2.1)));
void f2(int) __attribute__((availability(ios,introduced=2.0,deprecated=3.0)));
void f3(int) __attribute__((availability(ios,introduced=3.0)));
void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=2.1,obsoleted=3.0))); // expected-note{{explicitly marked unavailable}}

void f5(int) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(ios,deprecated=3.0)));
void f6(int) __attribute__((availability(ios,deprecated=3.0)));
void f6(int) __attribute__((availability(ios,introduced=2.0)));

void test() {
  f0(0); // expected-warning{{'f0' is deprecated: first deprecated in iOS 2.1}}
  f1(0);
  f2(0); // expected-warning{{'f2' is deprecated: first deprecated in iOS 3.0}}
  f3(0);
  f4(0); // expected-error{{f4' is unavailable: obsoleted in iOS 3.0}}
  f5(0); // expected-warning{{'f5' is deprecated: first deprecated in iOS 3.0}}
  f6(0); // expected-warning{{'f6' is deprecated: first deprecated in iOS 3.0}}
}


Use my_sleep instead of nanosleep for portability

--- ndb/src/common/portlib/NdbSleep.c
+++ ndb/src/common/portlib/NdbSleep.c
@@ -16,16 +16,21 @@

 #include <ndb_global.h>
+#include <my_sys.h>
 #include <NdbSleep.h>

 int
 NdbSleep_MilliSleep(int milliseconds){
+  my_sleep(milliseconds*1000);
+  return 0;
+#if 0
   int result = 0;
   struct timespec sleeptime;
   sleeptime.tv_sec = milliseconds / 1000;
   sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000;
   result = nanosleep(&sleeptime, NULL);
   return result;
+#endif
 }

 int

<|original_code|>
/* Copyright (C) 2003 MySQL AB

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

#include <ndb_global.h>
#include <NdbSleep.h>

int
NdbSleep_MilliSleep(int milliseconds){
  int result = 0;
  struct timespec sleeptime;
  sleeptime.tv_sec = milliseconds / 1000;
  sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000;
  result = nanosleep(&sleeptime, NULL);
  return result;
}

int
NdbSleep_SecSleep(int seconds){
  int result = 0;
  result = sleep(seconds);
  return result;
}

<|edits_diff|>
--- ndb/src/common/portlib/NdbSleep.c
+++ ndb/src/common/portlib/NdbSleep.c
@@ -16,10 +16,14 @@

 #include <ndb_global.h>
+#include <my_sys.h>
 #include <NdbSleep.h>

 int
 NdbSleep_MilliSleep(int milliseconds){
+  my_sleep(milliseconds*1000);
+  return 0;
+#if 0
   int result = 0;
   struct timespec sleeptime;
   sleeptime.tv_sec = milliseconds / 1000;
<|current_version|>
/* Copyright (C) 2003 MySQL AB

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

#include <ndb_global.h>
#include <my_sys.h>
#include <NdbSleep.h>

int
NdbSleep_MilliSleep(int milliseconds){
  my_sleep(milliseconds*1000);
  return 0;
#if 0
  int result = 0;
  struct timespec sleeptime;
  sleeptime.tv_sec = milliseconds / 1000;
  sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000;
  result = nanosleep(&sleeptime, NULL);
  return result;
}

int
NdbSleep_SecSleep(int seconds){
  int result = 0;
  result = sleep(seconds);
  return result;
}

<|next_version|>
/* Copyright (C) 2003 MySQL AB

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

#include <ndb_global.h>
#include <my_sys.h>
#include <NdbSleep.h>

int
NdbSleep_MilliSleep(int milliseconds){
  my_sleep(milliseconds*1000);
  return 0;
#if 0
  int result = 0;
  struct timespec sleeptime;
  sleeptime.tv_sec = milliseconds / 1000;
  sleeptime.tv_nsec = (milliseconds - (sleeptime.tv_sec * 1000)) * 1000000;
  result = nanosleep(&sleeptime, NULL);
  return result;
#endif
}

int
NdbSleep_SecSleep(int seconds){
  int result = 0;
  result = sleep(seconds);
  return result;
}


Add new classes to LinkDef

Add new classes to LinkDef

--- STRUCT/STRUCTLinkDef.h
+++ STRUCT/STRUCTLinkDef.h
@@ -11,6 +11,7 @@
 #pragma link C++ class  AliBODY;
 #pragma link C++ class  AliMAG;
 #pragma link C++ class  AliABSO;
+#pragma link C++ class  AliABSOv0;
 #pragma link C++ class  AliDIPO;
 #pragma link C++ class  AliDIPOv1;
 #pragma link C++ class  AliDIPOv2;
@@ -23,5 +24,6 @@
 #pragma link C++ class  AliPIPEv1;
 #pragma link C++ class  AliPIPEv3;
 #pragma link C++ class  AliSHIL;
+#pragma link C++ class  AliSHILv0;

 #endif

<|original_code|>
#ifdef __CINT__
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class  AliBODY;
#pragma link C++ class  AliMAG;
#pragma link C++ class  AliABSO;
#pragma link C++ class  AliDIPO;
#pragma link C++ class  AliDIPOv1;
#pragma link C++ class  AliDIPOv2;
#pragma link C++ class  AliFRAME;
#pragma link C++ class  AliFRAMEv0;
#pragma link C++ class  AliFRAMEv1;
#pragma link C++ class  AliHALL;
#pragma link C++ class  AliPIPE;
#pragma link C++ class  AliPIPEv0;
#pragma link C++ class  AliPIPEv1;
#pragma link C++ class  AliPIPEv3;
#pragma link C++ class  AliSHIL;

#endif

<|edits_diff|>
--- STRUCT/STRUCTLinkDef.h
+++ STRUCT/STRUCTLinkDef.h
@@ -11,6 +11,7 @@
 #pragma link C++ class  AliBODY;
 #pragma link C++ class  AliMAG;
 #pragma link C++ class  AliABSO;
+#pragma link C++ class  AliABSOv0;
 #pragma link C++ class  AliDIPO;
 #pragma link C++ class  AliDIPOv1;
 #pragma link C++ class  AliDIPOv2;
<|current_version|>
#ifdef __CINT__
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class  AliBODY;
#pragma link C++ class  AliMAG;
#pragma link C++ class  AliABSO;
#pragma link C++ class  AliABSOv0;
#pragma link C++ class  AliDIPO;
#pragma link C++ class  AliDIPOv1;
#pragma link C++ class  AliDIPOv2;
#pragma link C++ class  AliFRAME;
#pragma link C++ class  AliFRAMEv0;
#pragma link C++ class  AliFRAMEv1;
#pragma link C++ class  AliHALL;
#pragma link C++ class  AliPIPE;
#pragma link C++ class  AliPIPEv0;
#pragma link C++ class  AliPIPEv1;
#pragma link C++ class  AliPIPEv3;
#pragma link C++ class  AliSHIL;

#endif

<|next_version|>
#ifdef __CINT__
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class  AliBODY;
#pragma link C++ class  AliMAG;
#pragma link C++ class  AliABSO;
#pragma link C++ class  AliABSOv0;
#pragma link C++ class  AliDIPO;
#pragma link C++ class  AliDIPOv1;
#pragma link C++ class  AliDIPOv2;
#pragma link C++ class  AliFRAME;
#pragma link C++ class  AliFRAMEv0;
#pragma link C++ class  AliFRAMEv1;
#pragma link C++ class  AliHALL;
#pragma link C++ class  AliPIPE;
#pragma link C++ class  AliPIPEv0;
#pragma link C++ class  AliPIPEv1;
#pragma link C++ class  AliPIPEv3;
#pragma link C++ class  AliSHIL;
#pragma link C++ class  AliSHILv0;

#endif


Include more items in our namespace with shared_ptr.

--- inc/osvr/Util/SharedPtr.h
+++ inc/osvr/Util/SharedPtr.h
@@ -28,7 +28,9 @@

 namespace osvr {
 using std::shared_ptr;
+using std::weak_ptr;
 using std::make_shared;
+using std::enable_shared_from_this;
 } // namespace osvr
 #endif

<|original_code|>
/** @file
    @brief Header to bring shared_ptr into the ::osvr namespace.

    @date 2014

    @author
    Ryan Pavlik
    <ryan@sensics.com>
    <http://sensics.com>

*/

// Copyright 2014 Sensics, Inc.
//
// All rights reserved.
//
// (Final version intended to be licensed under
// the Apache License, Version 2.0)

#ifndef INCLUDED_SharedPtr_h_GUID_E9C5BC8D_7D3A_4896_1552_6F4F5292783C
#define INCLUDED_SharedPtr_h_GUID_E9C5BC8D_7D3A_4896_1552_6F4F5292783C

#if defined(_MSC_VER) && (_MSC_VER < 1600)
#error "Not supported before VS 2010"

#else
#include <memory>

namespace osvr {
using std::shared_ptr;
using std::make_shared;
} // namespace osvr
#endif

#endif // INCLUDED_SharedPtr_h_GUID_E9C5BC8D_7D3A_4896_1552_6F4F5292783C

<|edits_diff|>
--- inc/osvr/Util/SharedPtr.h
+++ inc/osvr/Util/SharedPtr.h
@@ -28,6 +28,7 @@

 namespace osvr {
 using std::shared_ptr;
+using std::weak_ptr;
 using std::make_shared;
 } // namespace osvr
 #endif
<|current_version|>
/** @file
    @brief Header to bring shared_ptr into the ::osvr namespace.

    @date 2014

    @author
    Ryan Pavlik
    <ryan@sensics.com>
    <http://sensics.com>

*/

// Copyright 2014 Sensics, Inc.
//
// All rights reserved.
//
// (Final version intended to be licensed under
// the Apache License, Version 2.0)

#ifndef INCLUDED_SharedPtr_h_GUID_E9C5BC8D_7D3A_4896_1552_6F4F5292783C
#define INCLUDED_SharedPtr_h_GUID_E9C5BC8D_7D3A_4896_1552_6F4F5292783C

#if defined(_MSC_VER) && (_MSC_VER < 1600)
#error "Not supported before VS 2010"

#else
#include <memory>

namespace osvr {
using std::shared_ptr;
using std::weak_ptr;
using std::make_shared;
} // namespace osvr
#endif

#endif // INCLUDED_SharedPtr_h_GUID_E9C5BC8D_7D3A_4896_1552_6F4F5292783C

<|next_version|>
/** @file
    @brief Header to bring shared_ptr into the ::osvr namespace.

    @date 2014

    @author
    Ryan Pavlik
    <ryan@sensics.com>
    <http://sensics.com>

*/

// Copyright 2014 Sensics, Inc.
//
// All rights reserved.
//
// (Final version intended to be licensed under
// the Apache License, Version 2.0)

#ifndef INCLUDED_SharedPtr_h_GUID_E9C5BC8D_7D3A_4896_1552_6F4F5292783C
#define INCLUDED_SharedPtr_h_GUID_E9C5BC8D_7D3A_4896_1552_6F4F5292783C

#if defined(_MSC_VER) && (_MSC_VER < 1600)
#error "Not supported before VS 2010"

#else
#include <memory>

namespace osvr {
using std::shared_ptr;
using std::weak_ptr;
using std::make_shared;
using std::enable_shared_from_this;
} // namespace osvr
#endif

#endif // INCLUDED_SharedPtr_h_GUID_E9C5BC8D_7D3A_4896_1552_6F4F5292783C


Fix Android vs. iOS GL header include

Fix Android vs. iOS GL header include

fbshipit-source-id: 75ec20a

--- cpp/EXGL.h
+++ cpp/EXGL.h
@@ -2,7 +2,13 @@
 #define __EXGL_H__

+#ifdef __ANDROID__
+#include <GLES2/gl2.h>
+#endif
+#ifdef __APPLE__
 #include <OpenGLES/ES2/gl.h>
+#endif
+
 #include <JavaScriptCore/JSBase.h>

<|original_code|>
#ifndef __EXGL_H__
#define __EXGL_H__

#include <OpenGLES/ES2/gl.h>
#include <JavaScriptCore/JSBase.h>

#ifdef __cplusplus
extern "C" {
#endif

// Identifies an EXGL context. No EXGL context has the id 0, so that can be
// used as a 'null' value.
typedef unsigned int EXGLContextId;

// [JS thread] Create an EXGL context and return its id number. Saves the
// JavaScript interface object (has a WebGLRenderingContext-style API) at
// `global.__EXGLContexts[id]` in JavaScript.
EXGLContextId EXGLContextCreate(JSGlobalContextRef jsCtx);

// [Any thread] Release the resources for an EXGL context. The same id is never
// reused.
void EXGLContextDestroy(EXGLContextId exglCtxId);

// [GL thread] Perform one frame's worth of queued up GL work
void EXGLContextFlush(EXGLContextId exglCtxId);

// [GL thread] Set the default framebuffer (used when binding 0). Allows using
// platform-specific extensions on the default framebuffer, such as MSAA.
void EXGLContextSetDefaultFramebuffer(EXGLContextId exglCtxId, GLint framebuffer);

#ifdef __cplusplus
}
#endif

#endif

<|edits_diff|>
--- cpp/EXGL.h
+++ cpp/EXGL.h
@@ -2,6 +2,10 @@
 #define __EXGL_H__

+#ifdef __ANDROID__
+#include <GLES2/gl2.h>
+#endif
+#ifdef __APPLE__
 #include <OpenGLES/ES2/gl.h>
 #include <JavaScriptCore/JSBase.h>

<|current_version|>
#ifndef __EXGL_H__
#define __EXGL_H__

#ifdef __ANDROID__
#include <GLES2/gl2.h>
#endif
#ifdef __APPLE__
#include <OpenGLES/ES2/gl.h>
#include <JavaScriptCore/JSBase.h>

#ifdef __cplusplus
extern "C" {
#endif

// Identifies an EXGL context. No EXGL context has the id 0, so that can be
// used as a 'null' value.
typedef unsigned int EXGLContextId;

// [JS thread] Create an EXGL context and return its id number. Saves the
// JavaScript interface object (has a WebGLRenderingContext-style API) at
// `global.__EXGLContexts[id]` in JavaScript.
EXGLContextId EXGLContextCreate(JSGlobalContextRef jsCtx);

// [Any thread] Release the resources for an EXGL context. The same id is never
// reused.
void EXGLContextDestroy(EXGLContextId exglCtxId);

// [GL thread] Perform one frame's worth of queued up GL work
void EXGLContextFlush(EXGLContextId exglCtxId);

// [GL thread] Set the default framebuffer (used when binding 0). Allows using
// platform-specific extensions on the default framebuffer, such as MSAA.
void EXGLContextSetDefaultFramebuffer(EXGLContextId exglCtxId, GLint framebuffer);

#ifdef __cplusplus
}
#endif

#endif

<|next_version|>
#ifndef __EXGL_H__
#define __EXGL_H__

#ifdef __ANDROID__
#include <GLES2/gl2.h>
#endif
#ifdef __APPLE__
#include <OpenGLES/ES2/gl.h>
#endif

#include <JavaScriptCore/JSBase.h>

#ifdef __cplusplus
extern "C" {
#endif

// Identifies an EXGL context. No EXGL context has the id 0, so that can be
// used as a 'null' value.
typedef unsigned int EXGLContextId;

// [JS thread] Create an EXGL context and return its id number. Saves the
// JavaScript interface object (has a WebGLRenderingContext-style API) at
// `global.__EXGLContexts[id]` in JavaScript.
EXGLContextId EXGLContextCreate(JSGlobalContextRef jsCtx);

// [Any thread] Release the resources for an EXGL context. The same id is never
// reused.
void EXGLContextDestroy(EXGLContextId exglCtxId);

// [GL thread] Perform one frame's worth of queued up GL work
void EXGLContextFlush(EXGLContextId exglCtxId);

// [GL thread] Set the default framebuffer (used when binding 0). Allows using
// platform-specific extensions on the default framebuffer, such as MSAA.
void EXGLContextSetDefaultFramebuffer(EXGLContextId exglCtxId, GLint framebuffer);

#ifdef __cplusplus
}
#endif

#endif


Set C linkage for win32 [v]asprintf

Set C linkage for win32 [v]asprintf

Change-Id: I7f82255467c05936baa702fa1d532156b0caba12
Reviewed-on: http://review.couchbase.org/52114
Reviewed-by: Dave Rigby <a09264da4832c7ff1d3bf1608a19f4b870f93750@couchbase.com>
Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>

--- include/win32/strings.h
+++ include/win32/strings.h
@@ -20,11 +20,19 @@

 #include <platform/visibility.h>

+#ifdef __cplusplus
+extern "C" {
+#endif
+
 PLATFORM_PUBLIC_API
 int asprintf(char **ret, const char *format, ...);

 PLATFORM_PUBLIC_API
 int vasprintf(char **ret, const char *format, va_list ap);
+
+#ifdef __cplusplus
+}
+#endif

 /*
 * We have a fair amount of use of this file in our code base.

<|original_code|>
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
*     Copyright 2014 Couchbase, Inc.
*
*   Licensed under the Apache License, Version 2.0 (the "License");
*   you may not use this file except in compliance with the License.
*   You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*   Unless required by applicable law or agreed to in writing, software
*   distributed under the License is distributed on an "AS IS" BASIS,
*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*   See the License for the specific language governing permissions and
*   limitations under the License.
*/
#pragma once

#include <stdarg.h>

#include <platform/visibility.h>

PLATFORM_PUBLIC_API
int asprintf(char **ret, const char *format, ...);

PLATFORM_PUBLIC_API
int vasprintf(char **ret, const char *format, va_list ap);

/*
* We have a fair amount of use of this file in our code base.
* Let's just make a dummy file to aviod a lot of #ifdefs
*/
#ifndef strcasecmp
#define strcasecmp(a, b) _stricmp(a, b)
#endif

#ifndef snprintf
#define snprintf _snprintf
#endif

<|edits_diff|>
--- include/win32/strings.h
+++ include/win32/strings.h
@@ -20,6 +20,10 @@

 #include <platform/visibility.h>

+#ifdef __cplusplus
+extern "C" {
+#endif
+
 PLATFORM_PUBLIC_API
 int asprintf(char **ret, const char *format, ...);

<|current_version|>
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
*     Copyright 2014 Couchbase, Inc.
*
*   Licensed under the Apache License, Version 2.0 (the "License");
*   you may not use this file except in compliance with the License.
*   You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*   Unless required by applicable law or agreed to in writing, software
*   distributed under the License is distributed on an "AS IS" BASIS,
*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*   See the License for the specific language governing permissions and
*   limitations under the License.
*/
#pragma once

#include <stdarg.h>

#include <platform/visibility.h>

#ifdef __cplusplus
extern "C" {
#endif

PLATFORM_PUBLIC_API
int asprintf(char **ret, const char *format, ...);

PLATFORM_PUBLIC_API
int vasprintf(char **ret, const char *format, va_list ap);

/*
* We have a fair amount of use of this file in our code base.
* Let's just make a dummy file to aviod a lot of #ifdefs
*/
#ifndef strcasecmp
#define strcasecmp(a, b) _stricmp(a, b)
#endif

#ifndef snprintf
#define snprintf _snprintf
#endif

<|next_version|>
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
*     Copyright 2014 Couchbase, Inc.
*
*   Licensed under the Apache License, Version 2.0 (the "License");
*   you may not use this file except in compliance with the License.
*   You may obtain a copy of the License at
*
*       http://www.apache.org/licenses/LICENSE-2.0
*
*   Unless required by applicable law or agreed to in writing, software
*   distributed under the License is distributed on an "AS IS" BASIS,
*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*   See the License for the specific language governing permissions and
*   limitations under the License.
*/
#pragma once

#include <stdarg.h>

#include <platform/visibility.h>

#ifdef __cplusplus
extern "C" {
#endif

PLATFORM_PUBLIC_API
int asprintf(char **ret, const char *format, ...);

PLATFORM_PUBLIC_API
int vasprintf(char **ret, const char *format, va_list ap);

#ifdef __cplusplus
}
#endif

/*
* We have a fair amount of use of this file in our code base.
* Let's just make a dummy file to aviod a lot of #ifdefs
*/
#ifndef strcasecmp
#define strcasecmp(a, b) _stricmp(a, b)
#endif

#ifndef snprintf
#define snprintf _snprintf
#endif


Add header define block to stop multiple header file inclusion.

--- src/api/yawot/version.h
+++ src/api/yawot/version.h
@@ -1,4 +1,6 @@

+#ifndef YAWOT_VERSION_H
+#define YAWOT_VERSION_H

 namespace yawot
 {
@@ -14,3 +16,5 @@

 }

+#endif /* YAWOT_VERSION_H */
+

<|original_code|>

namespace yawot
{

/**
 * Return the version of the *library* as an
 * unsigned integer.  The format is XXYYZZ
 * XX - major version
 * YY - minor version
 * ZZ - patch version
 */
unsigned int version();

}

<|edits_diff|>
--- src/api/yawot/version.h
+++ src/api/yawot/version.h
@@ -1,4 +1,6 @@

+#ifndef YAWOT_VERSION_H
+#define YAWOT_VERSION_H

 namespace yawot
 {
<|current_version|>

#ifndef YAWOT_VERSION_H
#define YAWOT_VERSION_H

namespace yawot
{

/**
 * Return the version of the *library* as an
 * unsigned integer.  The format is XXYYZZ
 * XX - major version
 * YY - minor version
 * ZZ - patch version
 */
unsigned int version();

}

<|next_version|>

#ifndef YAWOT_VERSION_H
#define YAWOT_VERSION_H

namespace yawot
{

/**
 * Return the version of the *library* as an
 * unsigned integer.  The format is XXYYZZ
 * XX - major version
 * YY - minor version
 * ZZ - patch version
 */
unsigned int version();

}

#endif /* YAWOT_VERSION_H */


[ARM] 3057/1: Add memory control method to support OneNAND sync burst read

Patch from Kyungmin Park

This patch is required for OneNAND MTD to passing the OneNAND sync. burst read

Signed-off-by: Kyungmin Park
Signed-off-by: Russell King <f6aa0246ff943bfa8602cdf60d40c481b38ed232@arm.linux.org.uk>

--- include/asm-arm/mach/flash.h
+++ include/asm-arm/mach/flash.h
@@ -11,6 +11,7 @@
 #define ASMARM_MACH_FLASH_H

 struct mtd_partition;
+struct mtd_info;

 /*
  * map_name:	the map probe function name
@@ -19,6 +20,7 @@
  * init:	method called at driver/device initialisation
  * exit:	method called at driver/device removal
  * set_vpp:	method called to enable or disable VPP
+ * mmcontrol:	method called to enable or disable Sync. Burst Read in OneNAND
  * parts:	optional array of mtd_partitions for static partitioning
  * nr_parts:	number of mtd_partitions for static partitoning
  */
@@ -29,6 +31,7 @@
 	int		(*init)(void);
 	void		(*exit)(void);
 	void		(*set_vpp)(int on);
+	void		(*mmcontrol)(struct mtd_info *mtd, int sync_read);
 	struct mtd_partition *parts;
 	unsigned int	nr_parts;
 };

<|original_code|>
/*
 *  linux/include/asm-arm/mach/flash.h
 *
 *  Copyright (C) 2003 Russell King, All Rights Reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#ifndef ASMARM_MACH_FLASH_H
#define ASMARM_MACH_FLASH_H

struct mtd_partition;

/*
 * map_name:	the map probe function name
 * name:	flash device name (eg, as used with mtdparts=)
 * width:	width of mapped device
 * init:	method called at driver/device initialisation
 * exit:	method called at driver/device removal
 * set_vpp:	method called to enable or disable VPP
 * parts:	optional array of mtd_partitions for static partitioning
 * nr_parts:	number of mtd_partitions for static partitoning
 */
struct flash_platform_data {
	const char	*map_name;
	const char	*name;
	unsigned int	width;
	int		(*init)(void);
	void		(*exit)(void);
	void		(*set_vpp)(int on);
	struct mtd_partition *parts;
	unsigned int	nr_parts;
};

#endif

<|edits_diff|>
--- include/asm-arm/mach/flash.h
+++ include/asm-arm/mach/flash.h
@@ -11,6 +11,7 @@
 #define ASMARM_MACH_FLASH_H

 struct mtd_partition;
+struct mtd_info;

 /*
  * map_name:	the map probe function name
@@ -19,6 +20,7 @@
  * init:	method called at driver/device initialisation
  * exit:	method called at driver/device removal
  * set_vpp:	method called to enable or disable VPP
+ * mmcontrol:	method called to enable or disable Sync. Burst Read in OneNAND
  * parts:	optional array of mtd_partitions for static partitioning
  * nr_parts:	number of mtd_partitions for static partitoning
  */
<|current_version|>
/*
 *  linux/include/asm-arm/mach/flash.h
 *
 *  Copyright (C) 2003 Russell King, All Rights Reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#ifndef ASMARM_MACH_FLASH_H
#define ASMARM_MACH_FLASH_H

struct mtd_partition;
struct mtd_info;

/*
 * map_name:	the map probe function name
 * name:	flash device name (eg, as used with mtdparts=)
 * width:	width of mapped device
 * init:	method called at driver/device initialisation
 * exit:	method called at driver/device removal
 * set_vpp:	method called to enable or disable VPP
 * mmcontrol:	method called to enable or disable Sync. Burst Read in OneNAND
 * parts:	optional array of mtd_partitions for static partitioning
 * nr_parts:	number of mtd_partitions for static partitoning
 */
struct flash_platform_data {
	const char	*map_name;
	const char	*name;
	unsigned int	width;
	int		(*init)(void);
	void		(*exit)(void);
	void		(*set_vpp)(int on);
	struct mtd_partition *parts;
	unsigned int	nr_parts;
};

#endif

<|next_version|>
/*
 *  linux/include/asm-arm/mach/flash.h
 *
 *  Copyright (C) 2003 Russell King, All Rights Reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#ifndef ASMARM_MACH_FLASH_H
#define ASMARM_MACH_FLASH_H

struct mtd_partition;
struct mtd_info;

/*
 * map_name:	the map probe function name
 * name:	flash device name (eg, as used with mtdparts=)
 * width:	width of mapped device
 * init:	method called at driver/device initialisation
 * exit:	method called at driver/device removal
 * set_vpp:	method called to enable or disable VPP
 * mmcontrol:	method called to enable or disable Sync. Burst Read in OneNAND
 * parts:	optional array of mtd_partitions for static partitioning
 * nr_parts:	number of mtd_partitions for static partitoning
 */
struct flash_platform_data {
	const char	*map_name;
	const char	*name;
	unsigned int	width;
	int		(*init)(void);
	void		(*exit)(void);
	void		(*set_vpp)(int on);
	void		(*mmcontrol)(struct mtd_info *mtd, int sync_read);
	struct mtd_partition *parts;
	unsigned int	nr_parts;
};

#endif


Add missing header file guards

Add missing header file guards

--- include/ethdrivers/intel.h
+++ include/ethdrivers/intel.h
@@ -7,6 +7,9 @@
  *
  * @TAG(NICTA_GPL)
  */
+
+#ifndef ETHIF_INTEL_H
+#define ETHIF_INTEL_H

 #include <platsupport/io.h>

@@ -29,3 +32,5 @@
  */
 struct eth_driver*
 ethif_e82574_init(ps_io_ops_t io_ops, void *bar0);
+
+#endif

<|original_code|>
/*
 * Copyright 2014, NICTA
 *
 * This software may be distributed and modified according to the terms of
 * the GNU General Public License version 2. Note that NO WARRANTY is provided.
 * See "LICENSE_GPLv2.txt" for details.
 *
 * @TAG(NICTA_GPL)
 */

#include <platsupport/io.h>

/**
 * This function initialises the hardware
 * @param[in] io_ops        A structure containing os specific data and
 *                          functions.
 * @param[in] bar0          Where pci bar0 has been mapped into our vspace
 * @return                  A reference to the ethernet drivers state.
 */
struct eth_driver*
ethif_e82580_init(ps_io_ops_t io_ops, void *bar0);

/**
 * This function initialises the hardware
 * @param[in] io_ops        A structure containing os specific data and
 *                          functions.
 * @param[in] bar0          Where pci bar0 has been mapped into our vspace
 * @return                  A reference to the ethernet drivers state.
 */
struct eth_driver*
ethif_e82574_init(ps_io_ops_t io_ops, void *bar0);

<|edits_diff|>
--- include/ethdrivers/intel.h
+++ include/ethdrivers/intel.h
@@ -7,6 +7,9 @@
  *
  * @TAG(NICTA_GPL)
  */
+
+#ifndef ETHIF_INTEL_H
+#define ETHIF_INTEL_H

 #include <platsupport/io.h>

<|current_version|>
/*
 * Copyright 2014, NICTA
 *
 * This software may be distributed and modified according to the terms of
 * the GNU General Public License version 2. Note that NO WARRANTY is provided.
 * See "LICENSE_GPLv2.txt" for details.
 *
 * @TAG(NICTA_GPL)
 */

#ifndef ETHIF_INTEL_H
#define ETHIF_INTEL_H

#include <platsupport/io.h>

/**
 * This function initialises the hardware
 * @param[in] io_ops        A structure containing os specific data and
 *                          functions.
 * @param[in] bar0          Where pci bar0 has been mapped into our vspace
 * @return                  A reference to the ethernet drivers state.
 */
struct eth_driver*
ethif_e82580_init(ps_io_ops_t io_ops, void *bar0);

/**
 * This function initialises the hardware
 * @param[in] io_ops        A structure containing os specific data and
 *                          functions.
 * @param[in] bar0          Where pci bar0 has been mapped into our vspace
 * @return                  A reference to the ethernet drivers state.
 */
struct eth_driver*
ethif_e82574_init(ps_io_ops_t io_ops, void *bar0);

<|next_version|>
/*
 * Copyright 2014, NICTA
 *
 * This software may be distributed and modified according to the terms of
 * the GNU General Public License version 2. Note that NO WARRANTY is provided.
 * See "LICENSE_GPLv2.txt" for details.
 *
 * @TAG(NICTA_GPL)
 */

#ifndef ETHIF_INTEL_H
#define ETHIF_INTEL_H

#include <platsupport/io.h>

/**
 * This function initialises the hardware
 * @param[in] io_ops        A structure containing os specific data and
 *                          functions.
 * @param[in] bar0          Where pci bar0 has been mapped into our vspace
 * @return                  A reference to the ethernet drivers state.
 */
struct eth_driver*
ethif_e82580_init(ps_io_ops_t io_ops, void *bar0);

/**
 * This function initialises the hardware
 * @param[in] io_ops        A structure containing os specific data and
 *                          functions.
 * @param[in] bar0          Where pci bar0 has been mapped into our vspace
 * @return                  A reference to the ethernet drivers state.
 */
struct eth_driver*
ethif_e82574_init(ps_io_ops_t io_ops, void *bar0);

#endif


Fix depracted boost asio types

Fix depracted boost asio types

--- src/csapex_remote/include/csapex/io/session_client.h
+++ src/csapex_remote/include/csapex/io/session_client.h
@@ -6,6 +6,7 @@

 /// SYSTEM
 #include <boost/asio.hpp>
+#include <boost/version.hpp>

 namespace csapex
 {
@@ -26,7 +27,12 @@
     boost::asio::io_service io_service;
     boost::asio::ip::tcp::socket socket_impl;
     boost::asio::ip::tcp::resolver resolver;
+#if (BOOST_VERSION / 100000) >= 1 && (BOOST_VERSION / 100 % 1000) >= 66
+    boost::asio::ip::tcp::resolver::endpoint_type resolver_iterator;
+#else
+    // deprecated in boost 1.66
     boost::asio::ip::tcp::resolver::iterator resolver_iterator;
+#endif

     bool io_service_running_;

<|original_code|>
#ifndef SESSION_CLIENT_H
#define SESSION_CLIENT_H

/// PROJECT
#include <csapex/io/session.h>

/// SYSTEM
#include <boost/asio.hpp>

namespace csapex
{
class SessionClient : public Session
{
public:
    SessionClient(const std::string& ip, int port);
    ~SessionClient() override;

    std::string getDescription() const override;

    void run() override;
    void shutdown() override;

    bool isRunning() const override;

private:
    boost::asio::io_service io_service;
    boost::asio::ip::tcp::socket socket_impl;
    boost::asio::ip::tcp::resolver resolver;
    boost::asio::ip::tcp::resolver::iterator resolver_iterator;

    bool io_service_running_;

    std::string ip_;
    int port_;
};

}  // namespace csapex

#endif  // SESSION_CLIENT_H

<|edits_diff|>
--- src/csapex_remote/include/csapex/io/session_client.h
+++ src/csapex_remote/include/csapex/io/session_client.h
@@ -6,6 +6,7 @@

 /// SYSTEM
 #include <boost/asio.hpp>
+#include <boost/version.hpp>

 namespace csapex
 {
@@ -26,6 +27,10 @@
     boost::asio::io_service io_service;
     boost::asio::ip::tcp::socket socket_impl;
     boost::asio::ip::tcp::resolver resolver;
+#if (BOOST_VERSION / 100000) >= 1 && (BOOST_VERSION / 100 % 1000) >= 66
+    boost::asio::ip::tcp::resolver::endpoint_type resolver_iterator;
+#else
+    // deprecated in boost 1.66
     boost::asio::ip::tcp::resolver::iterator resolver_iterator;

     bool io_service_running_;
<|current_version|>
#ifndef SESSION_CLIENT_H
#define SESSION_CLIENT_H

/// PROJECT
#include <csapex/io/session.h>

/// SYSTEM
#include <boost/asio.hpp>
#include <boost/version.hpp>

namespace csapex
{
class SessionClient : public Session
{
public:
    SessionClient(const std::string& ip, int port);
    ~SessionClient() override;

    std::string getDescription() const override;

    void run() override;
    void shutdown() override;

    bool isRunning() const override;

private:
    boost::asio::io_service io_service;
    boost::asio::ip::tcp::socket socket_impl;
    boost::asio::ip::tcp::resolver resolver;
#if (BOOST_VERSION / 100000) >= 1 && (BOOST_VERSION / 100 % 1000) >= 66
    boost::asio::ip::tcp::resolver::endpoint_type resolver_iterator;
#else
    // deprecated in boost 1.66
    boost::asio::ip::tcp::resolver::iterator resolver_iterator;

    bool io_service_running_;

    std::string ip_;
    int port_;
};

}  // namespace csapex

#endif  // SESSION_CLIENT_H

<|next_version|>
#ifndef SESSION_CLIENT_H
#define SESSION_CLIENT_H

/// PROJECT
#include <csapex/io/session.h>

/// SYSTEM
#include <boost/asio.hpp>
#include <boost/version.hpp>

namespace csapex
{
class SessionClient : public Session
{
public:
    SessionClient(const std::string& ip, int port);
    ~SessionClient() override;

    std::string getDescription() const override;

    void run() override;
    void shutdown() override;

    bool isRunning() const override;

private:
    boost::asio::io_service io_service;
    boost::asio::ip::tcp::socket socket_impl;
    boost::asio::ip::tcp::resolver resolver;
#if (BOOST_VERSION / 100000) >= 1 && (BOOST_VERSION / 100 % 1000) >= 66
    boost::asio::ip::tcp::resolver::endpoint_type resolver_iterator;
#else
    // deprecated in boost 1.66
    boost::asio::ip::tcp::resolver::iterator resolver_iterator;
#endif

    bool io_service_running_;

    std::string ip_;
    int port_;
};

}  // namespace csapex

#endif  // SESSION_CLIENT_H


Add vector to keep track of controls

Add vector to keep track of controls

--- Settings/Tab.h
+++ Settings/Tab.h
@@ -2,6 +2,8 @@

 #include <Windows.h>
 #include <vector>
+
+#include "Control.h"

 class UIContext;
 ///
@@ -21,9 +23,12 @@
     virtual void SaveSettings() = 0;

 protected:
+    /// Window handle of this tab.
     HWND _hWnd;
     UIContext *_ctxt;

+    /// A vector of all the controls present on this tab.
+    std::vector<Control *> _controls;

     ///
     /// Performs intitialization for the tab page, similar to a constructor.

<|original_code|>
#pragma once

#include <Windows.h>
#include <vector>

class UIContext;
///
/// Abstract class that encapsulates functionality for dealing with
/// property sheet pages (tabs).
///
class Tab {
public:
    Tab();
    ~Tab();

    /// Processes messages sent to the tab page.
    virtual DLGPROC TabProc(
        HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);

    /// Persists changes made on the tab page
    virtual void SaveSettings() = 0;

protected:
    HWND _hWnd;
    UIContext *_ctxt;

    ///
    /// Performs intitialization for the tab page, similar to a constructor.
    /// Since tab page windows are created on demand, this method could be
    /// called much later than the constructor for the tab.
    ///
    virtual void Initialize() = 0;

    /// Applies the current settings state to the tab page.
    virtual void LoadSettings() = 0;

    /// Handles WM_COMMAND messages.
    /// <param name="nCode">Control-defined notification code</param>
    /// <param name="ctrlId">Control identifier</param>
    virtual DLGPROC Command(unsigned short nCode, unsigned short ctrlId) = 0;

    /// Handles WM_NOTIFY messages.
    /// <param name="nHdr">Notification header structure</param>
    virtual DLGPROC Notification(NMHDR *nHdr) = 0;
};
<|edits_diff|>
--- Settings/Tab.h
+++ Settings/Tab.h
@@ -2,6 +2,8 @@

 #include <Windows.h>
 #include <vector>
+
+#include "Control.h"

 class UIContext;
 ///
@@ -21,6 +23,7 @@
     virtual void SaveSettings() = 0;

 protected:
+    /// Window handle of this tab.
     HWND _hWnd;
     UIContext *_ctxt;

<|current_version|>
#pragma once

#include <Windows.h>
#include <vector>

#include "Control.h"

class UIContext;
///
/// Abstract class that encapsulates functionality for dealing with
/// property sheet pages (tabs).
///
class Tab {
public:
    Tab();
    ~Tab();

    /// Processes messages sent to the tab page.
    virtual DLGPROC TabProc(
        HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);

    /// Persists changes made on the tab page
    virtual void SaveSettings() = 0;

protected:
    /// Window handle of this tab.
    HWND _hWnd;
    UIContext *_ctxt;

    ///
    /// Performs intitialization for the tab page, similar to a constructor.
    /// Since tab page windows are created on demand, this method could be
    /// called much later than the constructor for the tab.
    ///
    virtual void Initialize() = 0;

    /// Applies the current settings state to the tab page.
    virtual void LoadSettings() = 0;

    /// Handles WM_COMMAND messages.
    /// <param name="nCode">Control-defined notification code</param>
    /// <param name="ctrlId">Control identifier</param>
    virtual DLGPROC Command(unsigned short nCode, unsigned short ctrlId) = 0;

    /// Handles WM_NOTIFY messages.
    /// <param name="nHdr">Notification header structure</param>
    virtual DLGPROC Notification(NMHDR *nHdr) = 0;
};
<|next_version|>
#pragma once

#include <Windows.h>
#include <vector>

#include "Control.h"

class UIContext;
///
/// Abstract class that encapsulates functionality for dealing with
/// property sheet pages (tabs).
///
class Tab {
public:
    Tab();
    ~Tab();

    /// Processes messages sent to the tab page.
    virtual DLGPROC TabProc(
        HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);

    /// Persists changes made on the tab page
    virtual void SaveSettings() = 0;

protected:
    /// Window handle of this tab.
    HWND _hWnd;
    UIContext *_ctxt;

    /// A vector of all the controls present on this tab.
    std::vector<Control *> _controls;

    ///
    /// Performs intitialization for the tab page, similar to a constructor.
    /// Since tab page windows are created on demand, this method could be
    /// called much later than the constructor for the tab.
    ///
    virtual void Initialize() = 0;

    /// Applies the current settings state to the tab page.
    virtual void LoadSettings() = 0;

    /// Handles WM_COMMAND messages.
    /// <param name="nCode">Control-defined notification code</param>
    /// <param name="ctrlId">Control identifier</param>
    virtual DLGPROC Command(unsigned short nCode, unsigned short ctrlId) = 0;

    /// Handles WM_NOTIFY messages.
    /// <param name="nHdr">Notification header structure</param>
    virtual DLGPROC Notification(NMHDR *nHdr) = 0;
};


Document local persisted logging API.

Document local persisted logging API.

--- ARAnalyticalProvider.h
+++ ARAnalyticalProvider.h
@@ -31,7 +31,10 @@
 /// Submit a string to the provider's logging system
 - (void)remoteLog:(NSString *)parsedString;

+/// Submit a string to the local persisted logging system
 - (void)localLog:(NSString *)message;
+
+/// Retrieve messages provided to the local persisted logging system originating from a specified process.
 - (NSArray *)messagesForProcessID:(NSUInteger)processID;

 @end

<|original_code|>
@class UINavigationController, UIViewController;
@interface ARAnalyticalProvider : NSObject

/// Init
- (id)initWithIdentifier:(NSString *)identifier;

/// Set a per user property
- (void)identifyUserWithID:(NSString *)userID andEmailAddress:(NSString *)email;
- (void)setUserProperty:(NSString *)property toValue:(NSString *)value;

/// Submit user events
- (void)event:(NSString *)event withProperties:(NSDictionary *)properties;
- (void)incrementUserProperty:(NSString *)counterName byInt:(NSNumber *)amount;

/// Submit errors
- (void)error:(NSError *)error withMessage:(NSString *)message;

/// Monitor Navigation changes as page view
- (void)monitorNavigationViewController:(UINavigationController *)controller;

/// Submit an event with a time interval
- (void)logTimingEvent:(NSString *)event withInterval:(NSNumber *)interval;

/// Submit an event with a time interval and extra properties
/// @warning the properites must not contain the key string `length`.
- (void)logTimingEvent:(NSString *)event withInterval:(NSNumber *)interval properties:(NSDictionary *)properties;

/// Pass a specific event for showing a page
- (void)didShowNewPageView:(NSString *)pageTitle;

/// Submit a string to the provider's logging system
- (void)remoteLog:(NSString *)parsedString;

- (void)localLog:(NSString *)message;
- (NSArray *)messagesForProcessID:(NSUInteger)processID;

@end

<|edits_diff|>
--- ARAnalyticalProvider.h
+++ ARAnalyticalProvider.h
@@ -31,6 +31,7 @@
 /// Submit a string to the provider's logging system
 - (void)remoteLog:(NSString *)parsedString;

+/// Submit a string to the local persisted logging system
 - (void)localLog:(NSString *)message;
 - (NSArray *)messagesForProcessID:(NSUInteger)processID;

<|current_version|>
@class UINavigationController, UIViewController;
@interface ARAnalyticalProvider : NSObject

/// Init
- (id)initWithIdentifier:(NSString *)identifier;

/// Set a per user property
- (void)identifyUserWithID:(NSString *)userID andEmailAddress:(NSString *)email;
- (void)setUserProperty:(NSString *)property toValue:(NSString *)value;

/// Submit user events
- (void)event:(NSString *)event withProperties:(NSDictionary *)properties;
- (void)incrementUserProperty:(NSString *)counterName byInt:(NSNumber *)amount;

/// Submit errors
- (void)error:(NSError *)error withMessage:(NSString *)message;

/// Monitor Navigation changes as page view
- (void)monitorNavigationViewController:(UINavigationController *)controller;

/// Submit an event with a time interval
- (void)logTimingEvent:(NSString *)event withInterval:(NSNumber *)interval;

/// Submit an event with a time interval and extra properties
/// @warning the properites must not contain the key string `length`.
- (void)logTimingEvent:(NSString *)event withInterval:(NSNumber *)interval properties:(NSDictionary *)properties;

/// Pass a specific event for showing a page
- (void)didShowNewPageView:(NSString *)pageTitle;

/// Submit a string to the provider's logging system
- (void)remoteLog:(NSString *)parsedString;

/// Submit a string to the local persisted logging system
- (void)localLog:(NSString *)message;
- (NSArray *)messagesForProcessID:(NSUInteger)processID;

@end

<|next_version|>
@class UINavigationController, UIViewController;
@interface ARAnalyticalProvider : NSObject

/// Init
- (id)initWithIdentifier:(NSString *)identifier;

/// Set a per user property
- (void)identifyUserWithID:(NSString *)userID andEmailAddress:(NSString *)email;
- (void)setUserProperty:(NSString *)property toValue:(NSString *)value;

/// Submit user events
- (void)event:(NSString *)event withProperties:(NSDictionary *)properties;
- (void)incrementUserProperty:(NSString *)counterName byInt:(NSNumber *)amount;

/// Submit errors
- (void)error:(NSError *)error withMessage:(NSString *)message;

/// Monitor Navigation changes as page view
- (void)monitorNavigationViewController:(UINavigationController *)controller;

/// Submit an event with a time interval
- (void)logTimingEvent:(NSString *)event withInterval:(NSNumber *)interval;

/// Submit an event with a time interval and extra properties
/// @warning the properites must not contain the key string `length`.
- (void)logTimingEvent:(NSString *)event withInterval:(NSNumber *)interval properties:(NSDictionary *)properties;

/// Pass a specific event for showing a page
- (void)didShowNewPageView:(NSString *)pageTitle;

/// Submit a string to the provider's logging system
- (void)remoteLog:(NSString *)parsedString;

/// Submit a string to the local persisted logging system
- (void)localLog:(NSString *)message;

/// Retrieve messages provided to the local persisted logging system originating from a specified process.
- (NSArray *)messagesForProcessID:(NSUInteger)processID;

@end


Add global __RESTKIT__ define for aiding conditional compilation

--- Code/RestKit.h
+++ Code/RestKit.h
@@ -18,6 +18,9 @@
 //  limitations under the License.
 //

+#ifndef _RESTKIT_
+#define _RESTKIT_
+
 #import "ObjectMapping.h"
 #import "Network.h"
 #import "Support.h"
@@ -32,3 +35,5 @@
  */
 #undef RKLogComponent
 #define RKLogComponent RKlcl_cApp
+
+#endif /* _RESTKIT_ */

<|original_code|>
//
//  RestKit.h
//  RestKit
//
//  Created by Blake Watters on 2/19/10.
//  Copyright (c) 2009-2012 RestKit. All rights reserved.
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//

#import "ObjectMapping.h"
#import "Network.h"
#import "Support.h"
#import "CoreData.h"

/**
 Set the App logging component. This header
 file is generally only imported by apps that
 are pulling in all of RestKit. By setting the
 log component to App here, we allow the app developer
 to use RKLog() in their own app.
 */
#undef RKLogComponent
#define RKLogComponent RKlcl_cApp

<|edits_diff|>
--- Code/RestKit.h
+++ Code/RestKit.h
@@ -18,6 +18,9 @@
 //  limitations under the License.
 //

+#ifndef _RESTKIT_
+#define _RESTKIT_
+
 #import "ObjectMapping.h"
 #import "Network.h"
 #import "Support.h"
<|current_version|>
//
//  RestKit.h
//  RestKit
//
//  Created by Blake Watters on 2/19/10.
//  Copyright (c) 2009-2012 RestKit. All rights reserved.
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//

#ifndef _RESTKIT_
#define _RESTKIT_

#import "ObjectMapping.h"
#import "Network.h"
#import "Support.h"
#import "CoreData.h"

/**
 Set the App logging component. This header
 file is generally only imported by apps that
 are pulling in all of RestKit. By setting the
 log component to App here, we allow the app developer
 to use RKLog() in their own app.
 */
#undef RKLogComponent
#define RKLogComponent RKlcl_cApp

<|next_version|>
//
//  RestKit.h
//  RestKit
//
//  Created by Blake Watters on 2/19/10.
//  Copyright (c) 2009-2012 RestKit. All rights reserved.
//
//  Licensed under the Apache License, Version 2.0 (the "License");
//  you may not use this file except in compliance with the License.
//  You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//

#ifndef _RESTKIT_
#define _RESTKIT_

#import "ObjectMapping.h"
#import "Network.h"
#import "Support.h"
#import "CoreData.h"

/**
 Set the App logging component. This header
 file is generally only imported by apps that
 are pulling in all of RestKit. By setting the
 log component to App here, we allow the app developer
 to use RKLog() in their own app.
 */
#undef RKLogComponent
#define RKLogComponent RKlcl_cApp

#endif /* _RESTKIT_ */


Fix compilation on older linux kernels

Fix compilation on older linux kernels

--- Sources/Cinput/input.c
+++ Sources/Cinput/input.c
@@ -1,9 +1,17 @@
 #include "input.h"

 inline int input_event_get_sec(struct input_event event) {
+#ifdef input_event_sec
     return event.input_event_sec;
+#else
+    return event.time.tv_sec
+#endif
 }

 inline int input_event_get_usec(struct input_event event) {
+#ifdef input_event_usec
     return event.input_event_usec;
+#else
+    return event.time.tv_usec
+#endif
 }

<|original_code|>
#include "input.h"

inline int input_event_get_sec(struct input_event event) {
    return event.input_event_sec;
}

inline int input_event_get_usec(struct input_event event) {
    return event.input_event_usec;
}

<|edits_diff|>
--- Sources/Cinput/input.c
+++ Sources/Cinput/input.c
@@ -1,9 +1,14 @@
 #include "input.h"

 inline int input_event_get_sec(struct input_event event) {
+#ifdef input_event_sec
     return event.input_event_sec;
+#else
+    return event.time.tv_sec
+#endif
 }

 inline int input_event_get_usec(struct input_event event) {
+#ifdef input_event_usec
     return event.input_event_usec;
 }
<|current_version|>
#include "input.h"

inline int input_event_get_sec(struct input_event event) {
#ifdef input_event_sec
    return event.input_event_sec;
#else
    return event.time.tv_sec
#endif
}

inline int input_event_get_usec(struct input_event event) {
#ifdef input_event_usec
    return event.input_event_usec;
}

<|next_version|>
#include "input.h"

inline int input_event_get_sec(struct input_event event) {
#ifdef input_event_sec
    return event.input_event_sec;
#else
    return event.time.tv_sec
#endif
}

inline int input_event_get_usec(struct input_event event) {
#ifdef input_event_usec
    return event.input_event_usec;
#else
    return event.time.tv_usec
#endif
}


Add needed extern "C" to hgl winsys

winsys/hgl: Add needed extern "C" to hgl winsys

Reviewed-by: Brian Paul <3cb4e1df5ec4da2c7c4af7c52cec8cf340a55a10@vmware.com>

--- src/gallium/winsys/sw/hgl/hgl_sw_winsys.h
+++ src/gallium/winsys/sw/hgl/hgl_sw_winsys.h
@@ -27,9 +27,16 @@
 #ifndef _HGL_SOFTWAREWINSYS_H
 #define _HGL_SOFTWAREWINSYS_H

+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct sw_winsys;

 struct sw_winsys* hgl_create_sw_winsys(void);

+#ifdef __cplusplus
+}
+#endif

 #endif

<|original_code|>
/**************************************************************************
 *
 * Copyright 2009 Artur Wyszynski <harakash@gmail.com>
 * Copyright 2013 Alexander von Gluck IV <kallisti5@unixzen.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sub license, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 * USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial portions
 * of the Software.
 *
 **************************************************************************/
#ifndef _HGL_SOFTWAREWINSYS_H
#define _HGL_SOFTWAREWINSYS_H

struct sw_winsys;

struct sw_winsys* hgl_create_sw_winsys(void);

#endif

<|edits_diff|>
--- src/gallium/winsys/sw/hgl/hgl_sw_winsys.h
+++ src/gallium/winsys/sw/hgl/hgl_sw_winsys.h
@@ -27,6 +27,10 @@
 #ifndef _HGL_SOFTWAREWINSYS_H
 #define _HGL_SOFTWAREWINSYS_H

+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct sw_winsys;

 struct sw_winsys* hgl_create_sw_winsys(void);
<|current_version|>
/**************************************************************************
 *
 * Copyright 2009 Artur Wyszynski <harakash@gmail.com>
 * Copyright 2013 Alexander von Gluck IV <kallisti5@unixzen.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sub license, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 * USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial portions
 * of the Software.
 *
 **************************************************************************/
#ifndef _HGL_SOFTWAREWINSYS_H
#define _HGL_SOFTWAREWINSYS_H

#ifdef __cplusplus
extern "C" {
#endif

struct sw_winsys;

struct sw_winsys* hgl_create_sw_winsys(void);

#endif

<|next_version|>
/**************************************************************************
 *
 * Copyright 2009 Artur Wyszynski <harakash@gmail.com>
 * Copyright 2013 Alexander von Gluck IV <kallisti5@unixzen.com>
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sub license, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
 * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 * USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial portions
 * of the Software.
 *
 **************************************************************************/
#ifndef _HGL_SOFTWAREWINSYS_H
#define _HGL_SOFTWAREWINSYS_H

#ifdef __cplusplus
extern "C" {
#endif

struct sw_winsys;

struct sw_winsys* hgl_create_sw_winsys(void);

#ifdef __cplusplus
}
#endif

#endif


Fix missing comment in header.

Fix missing comment in header.

--- src/UserSpaceInstrumentation/include/UserSpaceInstrumentation/Attach.h
+++ src/UserSpaceInstrumentation/include/UserSpaceInstrumentation/Attach.h
@@ -11,8 +11,11 @@

 namespace orbit_user_space_instrumentation {

+// Attaches to and stops all threads of the process `pid` using `PTRACE_ATTACH`. Being attached to a
+// process using this function is a precondition for using any of the tooling provided here.
 [[nodiscard]] ErrorMessageOr<void> AttachAndStopProcess(pid_t pid);

+// Detaches from all threads of the process `pid` and continues the execution.
 [[nodiscard]] ErrorMessageOr<void> DetachAndContinueProcess(pid_t pid);

 }  // namespace orbit_user_space_instrumentation

<|original_code|>
// Copyright (c) 2021 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef USER_SPACE_INSTRUMENTATION_ATTACH_H_
#define USER_SPACE_INSTRUMENTATION_ATTACH_H_

#include <sys/types.h>

#include "OrbitBase/Result.h"

namespace orbit_user_space_instrumentation {

[[nodiscard]] ErrorMessageOr<void> AttachAndStopProcess(pid_t pid);

[[nodiscard]] ErrorMessageOr<void> DetachAndContinueProcess(pid_t pid);

}  // namespace orbit_user_space_instrumentation

#endif  // USER_SPACE_INSTRUMENTATION_ATTACH_H_
<|edits_diff|>
--- src/UserSpaceInstrumentation/include/UserSpaceInstrumentation/Attach.h
+++ src/UserSpaceInstrumentation/include/UserSpaceInstrumentation/Attach.h
@@ -11,6 +11,8 @@

 namespace orbit_user_space_instrumentation {

+// Attaches to and stops all threads of the process `pid` using `PTRACE_ATTACH`. Being attached to a
+// process using this function is a precondition for using any of the tooling provided here.
 [[nodiscard]] ErrorMessageOr<void> AttachAndStopProcess(pid_t pid);

 [[nodiscard]] ErrorMessageOr<void> DetachAndContinueProcess(pid_t pid);
<|current_version|>
// Copyright (c) 2021 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef USER_SPACE_INSTRUMENTATION_ATTACH_H_
#define USER_SPACE_INSTRUMENTATION_ATTACH_H_

#include <sys/types.h>

#include "OrbitBase/Result.h"

namespace orbit_user_space_instrumentation {

// Attaches to and stops all threads of the process `pid` using `PTRACE_ATTACH`. Being attached to a
// process using this function is a precondition for using any of the tooling provided here.
[[nodiscard]] ErrorMessageOr<void> AttachAndStopProcess(pid_t pid);

[[nodiscard]] ErrorMessageOr<void> DetachAndContinueProcess(pid_t pid);

}  // namespace orbit_user_space_instrumentation

#endif  // USER_SPACE_INSTRUMENTATION_ATTACH_H_
<|next_version|>
// Copyright (c) 2021 The Orbit Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef USER_SPACE_INSTRUMENTATION_ATTACH_H_
#define USER_SPACE_INSTRUMENTATION_ATTACH_H_

#include <sys/types.h>

#include "OrbitBase/Result.h"

namespace orbit_user_space_instrumentation {

// Attaches to and stops all threads of the process `pid` using `PTRACE_ATTACH`. Being attached to a
// process using this function is a precondition for using any of the tooling provided here.
[[nodiscard]] ErrorMessageOr<void> AttachAndStopProcess(pid_t pid);

// Detaches from all threads of the process `pid` and continues the execution.
[[nodiscard]] ErrorMessageOr<void> DetachAndContinueProcess(pid_t pid);

}  // namespace orbit_user_space_instrumentation

#endif  // USER_SPACE_INSTRUMENTATION_ATTACH_H_


Make diego happy before he notices.

Make diego happy before he notices.

git-svn-id: a4d7c1866f8397a4106e0b57fc4fbf792bbdaaaf@14810 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

--- libavutil/pca.h
+++ libavutil/pca.h
@@ -23,7 +23,12 @@
  * Principal component analysis
  */

+#ifndef FFMPEG_PCA_H
+#define FFMPEG_PCA_H
+
 struct PCA *ff_pca_init(int n);
 void ff_pca_free(struct PCA *pca);
 void ff_pca_add(struct PCA *pca, double *v);
 int ff_pca(struct PCA *pca, double *eigenvector, double *eigenvalue);
+
+#endif /* FFMPEG_PCA_H */

<|original_code|>
/*
 * Principal component analysis
 * Copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

/**
 * @file pca.h
 * Principal component analysis
 */

struct PCA *ff_pca_init(int n);
void ff_pca_free(struct PCA *pca);
void ff_pca_add(struct PCA *pca, double *v);
int ff_pca(struct PCA *pca, double *eigenvector, double *eigenvalue);

<|edits_diff|>
--- libavutil/pca.h
+++ libavutil/pca.h
@@ -23,6 +23,9 @@
  * Principal component analysis
  */

+#ifndef FFMPEG_PCA_H
+#define FFMPEG_PCA_H
+
 struct PCA *ff_pca_init(int n);
 void ff_pca_free(struct PCA *pca);
 void ff_pca_add(struct PCA *pca, double *v);
<|current_version|>
/*
 * Principal component analysis
 * Copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

/**
 * @file pca.h
 * Principal component analysis
 */

#ifndef FFMPEG_PCA_H
#define FFMPEG_PCA_H

struct PCA *ff_pca_init(int n);
void ff_pca_free(struct PCA *pca);
void ff_pca_add(struct PCA *pca, double *v);
int ff_pca(struct PCA *pca, double *eigenvector, double *eigenvalue);

<|next_version|>
/*
 * Principal component analysis
 * Copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */

/**
 * @file pca.h
 * Principal component analysis
 */

#ifndef FFMPEG_PCA_H
#define FFMPEG_PCA_H

struct PCA *ff_pca_init(int n);
void ff_pca_free(struct PCA *pca);
void ff_pca_add(struct PCA *pca, double *v);
int ff_pca(struct PCA *pca, double *eigenvector, double *eigenvalue);

#endif /* FFMPEG_PCA_H */


Fix Valgrind complaint about unitialized heap memory

--- src/skbuff.c
+++ src/skbuff.c
@@ -5,7 +5,10 @@
 {
     struct sk_buff *skb = malloc(sizeof(struct sk_buff));

+    memset(skb, 0, sizeof(struct sk_buff));
     skb->data = malloc(size);
+    memset(skb->data, 0, size);
+
     skb->head = skb->data;
     skb->tail = skb->data;
     skb->end = skb->tail + size;

<|original_code|>
#include "syshead.h"
#include "skbuff.h"

struct sk_buff *alloc_skb(unsigned int size)
{
    struct sk_buff *skb = malloc(sizeof(struct sk_buff));

    skb->data = malloc(size);
    skb->head = skb->data;
    skb->tail = skb->data;
    skb->end = skb->tail + size;

    return skb;
}

void *skb_reserve(struct sk_buff *skb, unsigned int len)
{
    skb->data += len;
    skb->tail += len;

    return skb->data;
}

uint8_t *skb_push(struct sk_buff *skb, unsigned int len)
{
    skb->data -= len;
    skb->len += len;

    return skb->data;
}

void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
{
    skb->dst = dst;
}

<|edits_diff|>
--- src/skbuff.c
+++ src/skbuff.c
@@ -5,6 +5,7 @@
 {
     struct sk_buff *skb = malloc(sizeof(struct sk_buff));

+    memset(skb, 0, sizeof(struct sk_buff));
     skb->data = malloc(size);
     skb->head = skb->data;
     skb->tail = skb->data;
<|current_version|>
#include "syshead.h"
#include "skbuff.h"

struct sk_buff *alloc_skb(unsigned int size)
{
    struct sk_buff *skb = malloc(sizeof(struct sk_buff));

    memset(skb, 0, sizeof(struct sk_buff));
    skb->data = malloc(size);
    skb->head = skb->data;
    skb->tail = skb->data;
    skb->end = skb->tail + size;

    return skb;
}

void *skb_reserve(struct sk_buff *skb, unsigned int len)
{
    skb->data += len;
    skb->tail += len;

    return skb->data;
}

uint8_t *skb_push(struct sk_buff *skb, unsigned int len)
{
    skb->data -= len;
    skb->len += len;

    return skb->data;
}

void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
{
    skb->dst = dst;
}

<|next_version|>
#include "syshead.h"
#include "skbuff.h"

struct sk_buff *alloc_skb(unsigned int size)
{
    struct sk_buff *skb = malloc(sizeof(struct sk_buff));

    memset(skb, 0, sizeof(struct sk_buff));
    skb->data = malloc(size);
    memset(skb->data, 0, size);

    skb->head = skb->data;
    skb->tail = skb->data;
    skb->end = skb->tail + size;

    return skb;
}

void *skb_reserve(struct sk_buff *skb, unsigned int len)
{
    skb->data += len;
    skb->tail += len;

    return skb->data;
}

uint8_t *skb_push(struct sk_buff *skb, unsigned int len)
{
    skb->data -= len;
    skb->len += len;

    return skb->data;
}

void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)
{
    skb->dst = dst;
}


Add normal information to terrain.

Add normal information to terrain.

--- subsys/ChTerrain.h
+++ subsys/ChTerrain.h
@@ -20,6 +20,7 @@
 #define CH_TERRAIN_H

 #include "core/ChShared.h"
+#include "core/ChVector.h"

 #include "subsys/ChApiSubsys.h"

@@ -36,6 +37,9 @@
   virtual void Advance(double step) {}

   virtual double GetHeight(double x, double y) const = 0;
+
+  //// TODO: make this a pure virtual function...
+  virtual ChVector<> GetNormal(double x, double y) const { return ChVector<>(0, 0, 1); }
 };

<|original_code|>
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: Radu Serban
// =============================================================================
//
// Base class for a terrain subsystem.
//
// =============================================================================

#ifndef CH_TERRAIN_H
#define CH_TERRAIN_H

#include "core/ChShared.h"

#include "subsys/ChApiSubsys.h"

namespace chrono {

class CH_SUBSYS_API ChTerrain : public ChShared {
public:
  ChTerrain() {}
  virtual ~ChTerrain() {}

  virtual void Update(double time) {}
  virtual void Advance(double step) {}

  virtual double GetHeight(double x, double y) const = 0;
};

} // end namespace chrono

#endif

<|edits_diff|>
--- subsys/ChTerrain.h
+++ subsys/ChTerrain.h
@@ -20,6 +20,7 @@
 #define CH_TERRAIN_H

 #include "core/ChShared.h"
+#include "core/ChVector.h"

 #include "subsys/ChApiSubsys.h"

<|current_version|>
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: Radu Serban
// =============================================================================
//
// Base class for a terrain subsystem.
//
// =============================================================================

#ifndef CH_TERRAIN_H
#define CH_TERRAIN_H

#include "core/ChShared.h"
#include "core/ChVector.h"

#include "subsys/ChApiSubsys.h"

namespace chrono {

class CH_SUBSYS_API ChTerrain : public ChShared {
public:
  ChTerrain() {}
  virtual ~ChTerrain() {}

  virtual void Update(double time) {}
  virtual void Advance(double step) {}

  virtual double GetHeight(double x, double y) const = 0;
};

} // end namespace chrono

#endif

<|next_version|>
// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that can be found
// in the LICENSE file at the top level of the distribution and at
// http://projectchrono.org/license-chrono.txt.
//
// =============================================================================
// Authors: Radu Serban
// =============================================================================
//
// Base class for a terrain subsystem.
//
// =============================================================================

#ifndef CH_TERRAIN_H
#define CH_TERRAIN_H

#include "core/ChShared.h"
#include "core/ChVector.h"

#include "subsys/ChApiSubsys.h"

namespace chrono {

class CH_SUBSYS_API ChTerrain : public ChShared {
public:
  ChTerrain() {}
  virtual ~ChTerrain() {}

  virtual void Update(double time) {}
  virtual void Advance(double step) {}

  virtual double GetHeight(double x, double y) const = 0;

  //// TODO: make this a pure virtual function...
  virtual ChVector<> GetNormal(double x, double y) const { return ChVector<>(0, 0, 1); }
};

} // end namespace chrono

#endif


Add prototypes for setbuffer() and setlinebuf(). Questionable as these should probably be replaced with ANSI stype setbuf() calls.

--- src/condor_includes/condor_fix_stdio.h
+++ src/condor_includes/condor_fix_stdio.h
@@ -17,9 +17,13 @@
 #if defined(__STDC__) || defined(__cplusplus)
 	FILE *popen( char *, char * );
 	int  pclose( FILE *__stream );
+	extern void     setbuffer(FILE*, char*, int);
+	extern void     setlinebuf(FILE*);
 #else
 	FILE *popen();
 	int  pclose();
+	extern void     setbuffer();
+	extern void     setlinebuf();
 #endif
 #endif	/* OSF1 */

<|original_code|>
#ifndef FIX_STDIO_H
#define FIX_STDIO_H

#include <stdio.h>

#if defined(__cplusplus)
extern "C" {
#endif

/*
  For some reason the stdio.h on OSF1 fails to provide prototypes
  for popen() and pclose() if _POSIX_SOURCE is defined.
*/
#if defined(OSF1)
#if defined(__STDC__) || defined(__cplusplus)
	FILE *popen( char *, char * );
	int  pclose( FILE *__stream );
#else
	FILE *popen();
	int  pclose();
#endif
#endif	/* OSF1 */

/*
  For some reason the stdio.h on Ultrix 4.3 fails to provide a prototype
  for pclose() if _POSIX_SOURCE is defined - even though it does
  provide a prototype for popen().
*/
#if defined(ULTRIX43)
#if defined(__STDC__) || defined(__cplusplus)
	int  pclose( FILE *__stream );
#else
	int  pclose();
#endif
#endif	/* ULTRIX43 */

#if defined(__cplusplus)
}
#endif

#endif

<|edits_diff|>
--- src/condor_includes/condor_fix_stdio.h
+++ src/condor_includes/condor_fix_stdio.h
@@ -17,6 +17,8 @@
 #if defined(__STDC__) || defined(__cplusplus)
 	FILE *popen( char *, char * );
 	int  pclose( FILE *__stream );
+	extern void     setbuffer(FILE*, char*, int);
+	extern void     setlinebuf(FILE*);
 #else
 	FILE *popen();
 	int  pclose();
<|current_version|>
#ifndef FIX_STDIO_H
#define FIX_STDIO_H

#include <stdio.h>

#if defined(__cplusplus)
extern "C" {
#endif

/*
  For some reason the stdio.h on OSF1 fails to provide prototypes
  for popen() and pclose() if _POSIX_SOURCE is defined.
*/
#if defined(OSF1)
#if defined(__STDC__) || defined(__cplusplus)
	FILE *popen( char *, char * );
	int  pclose( FILE *__stream );
	extern void     setbuffer(FILE*, char*, int);
	extern void     setlinebuf(FILE*);
#else
	FILE *popen();
	int  pclose();
#endif
#endif	/* OSF1 */

/*
  For some reason the stdio.h on Ultrix 4.3 fails to provide a prototype
  for pclose() if _POSIX_SOURCE is defined - even though it does
  provide a prototype for popen().
*/
#if defined(ULTRIX43)
#if defined(__STDC__) || defined(__cplusplus)
	int  pclose( FILE *__stream );
#else
	int  pclose();
#endif
#endif	/* ULTRIX43 */

#if defined(__cplusplus)
}
#endif

#endif

<|next_version|>
#ifndef FIX_STDIO_H
#define FIX_STDIO_H

#include <stdio.h>

#if defined(__cplusplus)
extern "C" {
#endif

/*
  For some reason the stdio.h on OSF1 fails to provide prototypes
  for popen() and pclose() if _POSIX_SOURCE is defined.
*/
#if defined(OSF1)
#if defined(__STDC__) || defined(__cplusplus)
	FILE *popen( char *, char * );
	int  pclose( FILE *__stream );
	extern void     setbuffer(FILE*, char*, int);
	extern void     setlinebuf(FILE*);
#else
	FILE *popen();
	int  pclose();
	extern void     setbuffer();
	extern void     setlinebuf();
#endif
#endif	/* OSF1 */

/*
  For some reason the stdio.h on Ultrix 4.3 fails to provide a prototype
  for pclose() if _POSIX_SOURCE is defined - even though it does
  provide a prototype for popen().
*/
#if defined(ULTRIX43)
#if defined(__STDC__) || defined(__cplusplus)
	int  pclose( FILE *__stream );
#else
	int  pclose();
#endif
#endif	/* ULTRIX43 */

#if defined(__cplusplus)
}
#endif

#endif


Add macro to know if "real" is double.

Add macro to know if "real" is double.

--- src/libaten/types.h
+++ src/libaten/types.h
@@ -7,7 +7,9 @@

 #ifdef TYPE_DOUBLE
 	using real = double;
+	#define AT_IS_TYPE_DOUBLE	(true)
 #else
 	using real = float;
+	#define AT_IS_TYPE_DOUBLE	(false)
 #endif

<|original_code|>
#pragma once

#include <stdint.h>
#include <climits>

//#define TYPE_DOUBLE

#ifdef TYPE_DOUBLE
	using real = double;
#else
	using real = float;
#endif

<|edits_diff|>
--- src/libaten/types.h
+++ src/libaten/types.h
@@ -7,6 +7,7 @@

 #ifdef TYPE_DOUBLE
 	using real = double;
+	#define AT_IS_TYPE_DOUBLE	(true)
 #else
 	using real = float;
 #endif
<|current_version|>
#pragma once

#include <stdint.h>
#include <climits>

//#define TYPE_DOUBLE

#ifdef TYPE_DOUBLE
	using real = double;
	#define AT_IS_TYPE_DOUBLE	(true)
#else
	using real = float;
#endif

<|next_version|>
#pragma once

#include <stdint.h>
#include <climits>

//#define TYPE_DOUBLE

#ifdef TYPE_DOUBLE
	using real = double;
	#define AT_IS_TYPE_DOUBLE	(true)
#else
	using real = float;
	#define AT_IS_TYPE_DOUBLE	(false)
#endif


Fix build failure with Python<=2.4 and PETSc<=3.1

<|original_code|>
/* ---------------------------------------------------------------- */

#include <Python.h>

/* ---------------------------------------------------------------- */

#define MPICH_SKIP_MPICXX 1
#define OMPI_SKIP_MPICXX 1

#include <petsc.h>

/* ---------------------------------------------------------------- */

#include "python_core.h"

#define PETSCMAT_DLL
#include "python_mat.c"
#undef  PETSCMAT_DLL

#define PETSCKSP_DLL
#include "python_ksp.c"
#undef PETSCKSP_DLL

#define PETSCKSP_DLL
#include "python_pc.c"
#undef PETSCKSP_DLL

#define PETSCSNES_DLL
#include "python_snes.c"
#undef PETSCSNES_DLL

#define PETSCTS_DLL
#include "python_ts.c"
#undef PETSCTS_DLL

/* ---------------------------------------------------------------- */

<|edits_diff|>
--- src/source/libpetsc4py.c
+++ src/source/libpetsc4py.c
@@ -1,5 +1,6 @@
 /* ---------------------------------------------------------------- */

+#define PY_SSIZE_T_CLEAN
 #include <Python.h>

 /* ---------------------------------------------------------------- */
<|current_version|>
/* ---------------------------------------------------------------- */

#define PY_SSIZE_T_CLEAN
#include <Python.h>

/* ---------------------------------------------------------------- */

#define MPICH_SKIP_MPICXX 1
#define OMPI_SKIP_MPICXX 1

#include <petsc.h>

/* ---------------------------------------------------------------- */

#include "python_core.h"

#define PETSCMAT_DLL
#include "python_mat.c"
#undef  PETSCMAT_DLL

#define PETSCKSP_DLL
#include "python_ksp.c"
#undef PETSCKSP_DLL

#define PETSCKSP_DLL
#include "python_pc.c"
#undef PETSCKSP_DLL

#define PETSCSNES_DLL
#include "python_snes.c"
#undef PETSCSNES_DLL

#define PETSCTS_DLL
#include "python_ts.c"
#undef PETSCTS_DLL

/* ---------------------------------------------------------------- */

<|next_version|>
/* ---------------------------------------------------------------- */

#define PY_SSIZE_T_CLEAN
#include <Python.h>
#if PY_VERSION_HEX < 0x02050000
typedef int Py_ssize_t;
#endif

/* ---------------------------------------------------------------- */

#define MPICH_SKIP_MPICXX 1
#define OMPI_SKIP_MPICXX 1

#include <petsc.h>

/* ---------------------------------------------------------------- */

#include "python_core.h"

#define PETSCMAT_DLL
#include "python_mat.c"
#undef  PETSCMAT_DLL

#define PETSCKSP_DLL
#include "python_ksp.c"
#undef PETSCKSP_DLL

#define PETSCKSP_DLL
#include "python_pc.c"
#undef PETSCKSP_DLL

#define PETSCSNES_DLL
#include "python_snes.c"
#undef PETSCSNES_DLL

#define PETSCTS_DLL
#include "python_ts.c"
#undef PETSCTS_DLL

/* ---------------------------------------------------------------- */


Put new codecs in module codec header

Put new codecs in module codec header

--- Wangscape/noise/module/codecs/ModuleCodecs.h
+++ Wangscape/noise/module/codecs/ModuleCodecs.h
@@ -8,16 +8,21 @@
 #include "CheckerboardWrapperCodec.h"
 #include "ClampWrapperCodec.h"
 #include "ConstWrapperCodec.h"
+#include "CornerCombinerBaseWrapperCodec.h"
 #include "CurveWrapperCodec.h"
 #include "CylindersWrapperCodec.h"
 #include "DisplaceWrapperCodec.h"
+#include "ExpWrapperCodec.h"
 #include "ExponentWrapperCodec.h"
+#include "ForwardWrapperCodec.h"
 #include "InvertWrapperCodec.h"
 #include "MaxWrapperCodec.h"
 #include "MinWrapperCodec.h"
 #include "MultiplyWrapperCodec.h"
+#include "NormLPQWrapperCodec.h"
 #include "NoiseSourcesCodec.h"
 #include "PerlinWrapperCodec.h"
+#include "PowWrapperCodec.h"
 #include "PowerWrapperCodec.h"
 #include "RidgedMultiWrapperCodec.h"
 #include "RotatePointWrapperCodec.h"

<|original_code|>
#pragma once

#include "AbsWrapperCodec.h"
#include "AddWrapperCodec.h"
#include "BillowWrapperCodec.h"
#include "BlendWrapperCodec.h"
#include "CacheWrapperCodec.h"
#include "CheckerboardWrapperCodec.h"
#include "ClampWrapperCodec.h"
#include "ConstWrapperCodec.h"
#include "CurveWrapperCodec.h"
#include "CylindersWrapperCodec.h"
#include "DisplaceWrapperCodec.h"
#include "ExponentWrapperCodec.h"
#include "InvertWrapperCodec.h"
#include "MaxWrapperCodec.h"
#include "MinWrapperCodec.h"
#include "MultiplyWrapperCodec.h"
#include "NoiseSourcesCodec.h"
#include "PerlinWrapperCodec.h"
#include "PowerWrapperCodec.h"
#include "RidgedMultiWrapperCodec.h"
#include "RotatePointWrapperCodec.h"
#include "ScaleBiasWrapperCodec.h"
#include "ScalePointCodec.h"
#include "SelectWrapperCodec.h"
#include "SpheresWrapperCodec.h"
#include "TerraceWrapperCodec.h"
#include "TranslatePointWrapperCodec.h"
#include "TurbulenceWrapperCodec.h"
#include "VoronoiWrapperCodec.h"

<|edits_diff|>
--- Wangscape/noise/module/codecs/ModuleCodecs.h
+++ Wangscape/noise/module/codecs/ModuleCodecs.h
@@ -8,14 +8,18 @@
 #include "CheckerboardWrapperCodec.h"
 #include "ClampWrapperCodec.h"
 #include "ConstWrapperCodec.h"
+#include "CornerCombinerBaseWrapperCodec.h"
 #include "CurveWrapperCodec.h"
 #include "CylindersWrapperCodec.h"
 #include "DisplaceWrapperCodec.h"
+#include "ExpWrapperCodec.h"
 #include "ExponentWrapperCodec.h"
+#include "ForwardWrapperCodec.h"
 #include "InvertWrapperCodec.h"
 #include "MaxWrapperCodec.h"
 #include "MinWrapperCodec.h"
 #include "MultiplyWrapperCodec.h"
+#include "NormLPQWrapperCodec.h"
 #include "NoiseSourcesCodec.h"
 #include "PerlinWrapperCodec.h"
 #include "PowerWrapperCodec.h"
<|current_version|>
#pragma once

#include "AbsWrapperCodec.h"
#include "AddWrapperCodec.h"
#include "BillowWrapperCodec.h"
#include "BlendWrapperCodec.h"
#include "CacheWrapperCodec.h"
#include "CheckerboardWrapperCodec.h"
#include "ClampWrapperCodec.h"
#include "ConstWrapperCodec.h"
#include "CornerCombinerBaseWrapperCodec.h"
#include "CurveWrapperCodec.h"
#include "CylindersWrapperCodec.h"
#include "DisplaceWrapperCodec.h"
#include "ExpWrapperCodec.h"
#include "ExponentWrapperCodec.h"
#include "ForwardWrapperCodec.h"
#include "InvertWrapperCodec.h"
#include "MaxWrapperCodec.h"
#include "MinWrapperCodec.h"
#include "MultiplyWrapperCodec.h"
#include "NormLPQWrapperCodec.h"
#include "NoiseSourcesCodec.h"
#include "PerlinWrapperCodec.h"
#include "PowerWrapperCodec.h"
#include "RidgedMultiWrapperCodec.h"
#include "RotatePointWrapperCodec.h"
#include "ScaleBiasWrapperCodec.h"
#include "ScalePointCodec.h"
#include "SelectWrapperCodec.h"
#include "SpheresWrapperCodec.h"
#include "TerraceWrapperCodec.h"
#include "TranslatePointWrapperCodec.h"
#include "TurbulenceWrapperCodec.h"
#include "VoronoiWrapperCodec.h"

<|next_version|>
#pragma once

#include "AbsWrapperCodec.h"
#include "AddWrapperCodec.h"
#include "BillowWrapperCodec.h"
#include "BlendWrapperCodec.h"
#include "CacheWrapperCodec.h"
#include "CheckerboardWrapperCodec.h"
#include "ClampWrapperCodec.h"
#include "ConstWrapperCodec.h"
#include "CornerCombinerBaseWrapperCodec.h"
#include "CurveWrapperCodec.h"
#include "CylindersWrapperCodec.h"
#include "DisplaceWrapperCodec.h"
#include "ExpWrapperCodec.h"
#include "ExponentWrapperCodec.h"
#include "ForwardWrapperCodec.h"
#include "InvertWrapperCodec.h"
#include "MaxWrapperCodec.h"
#include "MinWrapperCodec.h"
#include "MultiplyWrapperCodec.h"
#include "NormLPQWrapperCodec.h"
#include "NoiseSourcesCodec.h"
#include "PerlinWrapperCodec.h"
#include "PowWrapperCodec.h"
#include "PowerWrapperCodec.h"
#include "RidgedMultiWrapperCodec.h"
#include "RotatePointWrapperCodec.h"
#include "ScaleBiasWrapperCodec.h"
#include "ScalePointCodec.h"
#include "SelectWrapperCodec.h"
#include "SpheresWrapperCodec.h"
#include "TerraceWrapperCodec.h"
#include "TranslatePointWrapperCodec.h"
#include "TurbulenceWrapperCodec.h"
#include "VoronoiWrapperCodec.h"


Add headers and status code to response

Add headers and status code to response

--- src/http/responsedata.h
+++ src/http/responsedata.h
@@ -2,10 +2,14 @@
 #define APIMOCK_RESPONSEDATA_H

 #include <string>
+#include <unordered_map>
+#include "statuscodes.h"

 namespace ApiMock {
 	struct ResponseData {
 		std::string body;
+		std::unordered_map<std::string, std::string> headers;
+		HTTP_RESPONSE_CODE statusCode;
 	};
 }

<|original_code|>
#ifndef APIMOCK_RESPONSEDATA_H
#define APIMOCK_RESPONSEDATA_H

#include <string>

namespace ApiMock {
	struct ResponseData {
		std::string body;
	};
}

#endif
<|edits_diff|>
--- src/http/responsedata.h
+++ src/http/responsedata.h
@@ -2,6 +2,8 @@
 #define APIMOCK_RESPONSEDATA_H

 #include <string>
+#include <unordered_map>
+#include "statuscodes.h"

 namespace ApiMock {
 	struct ResponseData {
<|current_version|>
#ifndef APIMOCK_RESPONSEDATA_H
#define APIMOCK_RESPONSEDATA_H

#include <string>
#include <unordered_map>
#include "statuscodes.h"

namespace ApiMock {
	struct ResponseData {
		std::string body;
	};
}

#endif
<|next_version|>
#ifndef APIMOCK_RESPONSEDATA_H
#define APIMOCK_RESPONSEDATA_H

#include <string>
#include <unordered_map>
#include "statuscodes.h"

namespace ApiMock {
	struct ResponseData {
		std::string body;
		std::unordered_map<std::string, std::string> headers;
		HTTP_RESPONSE_CODE statusCode;
	};
}

#endif


Use if includes for fb/tiwtter

Use if includes for fb/tiwtter

--- Pod/Classes/Artsy+Authentication.h
+++ Pod/Classes/Artsy+Authentication.h
@@ -1,4 +1,8 @@
 #import "ArtsyToken.h"
 #import "ArtsyAuthentication.h"
+#if __has_include("ArtsyAuthentication+Facebook.h")
 #import "ArtsyAuthentication+Facebook.h"
+#endif
+#if __has_include("ArtsyAuthentication+Twitter.h")
 #import "ArtsyAuthentication+Twitter.h"
+#endif

<|original_code|>
#import "ArtsyToken.h"
#import "ArtsyAuthentication.h"
#import "ArtsyAuthentication+Facebook.h"
#import "ArtsyAuthentication+Twitter.h"
<|edits_diff|>
--- Pod/Classes/Artsy+Authentication.h
+++ Pod/Classes/Artsy+Authentication.h
@@ -1,4 +1,7 @@
 #import "ArtsyToken.h"
 #import "ArtsyAuthentication.h"
 #import "ArtsyAuthentication+Facebook.h"
+#endif
+#if __has_include("ArtsyAuthentication+Twitter.h")
 #import "ArtsyAuthentication+Twitter.h"
+#endif
<|current_version|>
#import "ArtsyToken.h"
#import "ArtsyAuthentication.h"
#import "ArtsyAuthentication+Facebook.h"
#endif
#if __has_include("ArtsyAuthentication+Twitter.h")
#import "ArtsyAuthentication+Twitter.h"
#endif

<|next_version|>
#import "ArtsyToken.h"
#import "ArtsyAuthentication.h"
#if __has_include("ArtsyAuthentication+Facebook.h")
#import "ArtsyAuthentication+Facebook.h"
#endif
#if __has_include("ArtsyAuthentication+Twitter.h")
#import "ArtsyAuthentication+Twitter.h"
#endif


[IMT] Fix warning during dictionary generation in no-imt builds

--- core/imt/inc/LinkDef.h
+++ core/imt/inc/LinkDef.h
@@ -5,8 +5,11 @@
 #pragma link off all functions;

 // Only for the autoload, autoparse. No IO of these classes is foreseen!
+// Exclude in case ROOT does not have IMT support
+#ifdef R__USE_IMT
 #pragma link C++ class ROOT::Internal::TPoolManager-;
 #pragma link C++ class ROOT::TThreadExecutor-;
 #pragma link C++ class ROOT::Experimental::TTaskGroup-;
+#endif

 #endif

<|original_code|>
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

// Only for the autoload, autoparse. No IO of these classes is foreseen!
#pragma link C++ class ROOT::Internal::TPoolManager-;
#pragma link C++ class ROOT::TThreadExecutor-;
#pragma link C++ class ROOT::Experimental::TTaskGroup-;

#endif

<|edits_diff|>
--- core/imt/inc/LinkDef.h
+++ core/imt/inc/LinkDef.h
@@ -5,6 +5,8 @@
 #pragma link off all functions;

 // Only for the autoload, autoparse. No IO of these classes is foreseen!
+// Exclude in case ROOT does not have IMT support
+#ifdef R__USE_IMT
 #pragma link C++ class ROOT::Internal::TPoolManager-;
 #pragma link C++ class ROOT::TThreadExecutor-;
 #pragma link C++ class ROOT::Experimental::TTaskGroup-;
<|current_version|>
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

// Only for the autoload, autoparse. No IO of these classes is foreseen!
// Exclude in case ROOT does not have IMT support
#ifdef R__USE_IMT
#pragma link C++ class ROOT::Internal::TPoolManager-;
#pragma link C++ class ROOT::TThreadExecutor-;
#pragma link C++ class ROOT::Experimental::TTaskGroup-;

#endif

<|next_version|>
#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

// Only for the autoload, autoparse. No IO of these classes is foreseen!
// Exclude in case ROOT does not have IMT support
#ifdef R__USE_IMT
#pragma link C++ class ROOT::Internal::TPoolManager-;
#pragma link C++ class ROOT::TThreadExecutor-;
#pragma link C++ class ROOT::Experimental::TTaskGroup-;
#endif

#endif